Skip to content

Commit 933fbfe

Browse files
committedFeb 22, 2019
fix: hoist postcss plugin
1 parent 24cb888 commit 933fbfe

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed
 

‎src/index.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ export class Bundler {
223223
}
224224
}
225225

226+
plugins.push(
227+
require('rollup-plugin-postcss')(
228+
Object.assign({}, config.plugins.postcss, {
229+
extract: config.output.extractCSS !== false
230+
})
231+
)
232+
)
233+
226234
if (source.hasTs && config.plugins.typescript2 !== false) {
227235
plugins.push(
228236
this.localRequire('rollup-plugin-typescript2')(
@@ -264,6 +272,8 @@ export class Bundler {
264272
if (config.babel.minimal) {
265273
plugins.push(
266274
require('rollup-plugin-buble')({
275+
exclude: 'node_modules/**',
276+
include: '**/*.{js,mjs,jsx}',
267277
transforms: {
268278
modules: false,
269279
dangerousForOf: true,
@@ -303,14 +313,6 @@ export class Bundler {
303313
})
304314
)
305315

306-
plugins.push(
307-
require('rollup-plugin-postcss')(
308-
Object.assign({}, config.plugins.postcss, {
309-
extract: config.output.extractCSS !== false
310-
})
311-
)
312-
)
313-
314316
if (config.env) {
315317
const env = Object.assign({}, config.env)
316318
plugins.push(

0 commit comments

Comments
 (0)
Please sign in to comment.