Skip to content

Commit cf1827a

Browse files
committed
Simplified fixes from giuseppeg#46 and giuseppeg#51
1 parent 9424514 commit cf1827a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

processor.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ module.exports = function processor(src, options) {
88

99
const loaderPromise = loaderPromises.hasOwnProperty(options.path || 'auto')
1010
? loaderPromises[options.path || 'auto']
11-
: loader(options.env || process.env, options.path, {
11+
: loader({env: options.env || process.env, ...(options.pluginOptions||{})}, options.path, {
1212
argv: false
1313
}).then((pluginsInfo) => pluginsInfo.plugins || [])
1414

1515
loaderPromises[options.path || 'auto'] = loaderPromise
1616

1717
return loaderPromise
18-
.then((plugins) => postcss(plugins).process(src, { from: false }))
18+
.then((plugins) => postcss(plugins).process(src, {
19+
from: (options.babel || {}).filename || "unknown filename",
20+
...(options.processOptions || {})
21+
}))
1922
.then((result) => result.css)
2023
}

0 commit comments

Comments
 (0)