Skip to content

Commit 8e7872d

Browse files
ajoslinahdinosaur
authored andcommitted
Run in 'label' phase instead of 'debug' phase (#8)
This makes css-extract run before bundle-collapser. bundle-collapser will change `require('insert-css')` to a number, eg `require(1)`, which will break css-extract. Closes #5
1 parent e4129b5 commit 8e7872d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ function cssExtract (bundle, opts) {
2727
? outFile()
2828
: bl(writeComplete)
2929

30-
// run before the "debug" step in browserify pipeline
31-
bundle.pipeline.get('debug').unshift(extractStream)
30+
// run before the "label" step in browserify pipeline
31+
bundle.pipeline.get('label').unshift(extractStream)
3232

3333
function write (chunk, enc, cb) {
3434
// Performance boost: don't do ast parsing unless we know it's needed

0 commit comments

Comments
 (0)