Skip to content

Commit

Permalink
refactor: do not pass meta from other loaders (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Sep 4, 2020
1 parent 25a16a0 commit ba88040
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/index.js
Expand Up @@ -29,7 +29,7 @@ import {
* @return {callback} callback Result
*/

export default async function loader(content, sourceMap, meta = {}) {
export default async function loader(content, sourceMap) {
const options = getOptions(this);

validateOptions(schema, options, {
Expand Down Expand Up @@ -156,10 +156,8 @@ export default async function loader(content, sourceMap, meta = {}) {
const ast = {
type: 'postcss',
version: result.processor.version,
root: result.result,
root: result.root,
};

const newMeta = { ...meta, ast };

callback(null, result.css, map, newMeta);
callback(null, result.css, map, { ast });
}

0 comments on commit ba88040

Please sign in to comment.