Introduce Webpack 2 to fix postcss bundling (#1836)
It turns out rollup doesn't use the same algorithm for bundling commonjs files when there are cycles as node, which breaks postcss: https://twitter.com/Rich_Harris/status/869021144191561729. Webpack works just fine with it. This sucks to have this rollup/webpack frankenstein but I really want to be able to release and don't really want to spend yet another day or two trying to make it work well.
This commit is contained in:
1 parent
f4ef1c2c97
commit
f4296550db
4 files changed
+534
-22
No files matched your search
@@ -24,4 +24,9 @@ echo 'Bundling typescript...';
|
||||
node_modules/.bin/rollup -c scripts/build/rollup.parser.config.js --environment parser:typescript
|
||||
|
||||
echo 'Bundling postcss...';
|
||||
node_modules/.bin/rollup -c scripts/build/rollup.parser.config.js --environment parser:postcss
|
||||
# PostCSS has dependency cycles and won't work correctly with rollup :(
|
||||
./node_modules/.bin/webpack src/parser-postcss.js dist/src/parser-postcss.js
|
||||
# Prepend module.exports =
|
||||
echo "module.exports =" > dist/src/parser-postcss.js.tmp
|
||||
cat dist/src/parser-postcss.js >> dist/src/parser-postcss.js.tmp
|
||||
mv dist/src/parser-postcss.js.tmp dist/src/parser-postcss.js
|
||||
Reference in new issue
Block a user