Skip to content

Commit

Permalink
Workaround postcss trying to call fs.existsSync()
Browse files Browse the repository at this point in the history
When input contains annotation for external source map,
postcss will try to load it even in browser build.

Apply source patch to workaround this for now.

Fixes #193
  • Loading branch information
albb0920 committed Nov 2, 2020
1 parent 3233411 commit 4c43a0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build/rollup.config.js
Expand Up @@ -18,7 +18,8 @@ export default {
// patches for browser build
replace({
"colorette.enabled": "null",
include: ["node_modules/postcss/lib/css-syntax-error.js"],
"existsSync(": "void(",
include: ["node_modules/postcss/lib/css-syntax-error.js", "node_modules/postcss/lib/previous-map.js"],
delimiters: ['', '']
}),
json(),
Expand Down
4 changes: 2 additions & 2 deletions vendor/autoprefixer.js

Large diffs are not rendered by default.

0 comments on commit 4c43a0e

Please sign in to comment.