Comments (4)
#6 seems to fix this issue on my end, I'm still pretty new to svelte so I could be wrong.
from svelte-webpack-starter.
So it looks like this is caused indirectly by another error:
I noticed when debugging compilation.fileDependencies
that there is a large array of files followed by a single [..., null]
entry at the end. Looking further, using webpack serve --stats verbose
I found this error:
ERROR in ./src/App.svelte
Module build failed (from ./node_modules/svelte-loader/index.js):
Error: PostCSS plugin autoprefixer requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
at Processor.normalize (/Users/duane/Relm/relm-wp5/node_modules/postcss/lib/processor.es6:117:15)
at new Processor (/Users/duane/Relm/relm-wp5/node_modules/postcss/lib/processor.es6:38:25)
at Object.postcss (/Users/duane/Relm/relm-wp5/node_modules/postcss/lib/postcss.es6:34:10)
at process (/Users/duane/Relm/relm-wp5/node_modules/svelte-preprocess/dist/transformers/postcss.js:28:59)
at transformer (/Users/duane/Relm/relm-wp5/node_modules/svelte-preprocess/dist/transformers/postcss.js:72:16)
at Object.transform (/Users/duane/Relm/relm-wp5/node_modules/svelte-preprocess/dist/autoProcess.js:37:12)
at runNextTicks (internal/process/task_queues.js:58:5)
at processImmediate (internal/timers.js:434:9)
at style (/Users/duane/Relm/relm-wp5/node_modules/svelte-preprocess/dist/autoProcess.js:167:37)
at process_single_tag (/Users/duane/Relm/relm-wp5/node_modules/svelte/src/compiler/preprocess/index.ts:160:21)
When I add yarn add -D [email protected]
and then yarn remove optimize-css-assets-webpack-plugin
(and remove references to OptimizeCSSAssetsPlugin
in webpack.config.js) then everything "works". Of course, this solution causes the CSS minification in prod build to be disabled, however.
from svelte-webpack-starter.
I'm able to see this too, but only with yarn
. Everything is normal with npm
and pnpm
.
I determined from #4 that yarn is installing dependencies differently than npm which is causing inconsistencies. This is probably the same case. I'll look deeper into this when I have a chance tonight.
from svelte-webpack-starter.
Thanks @edwardrubio, your PR did fix this. The issue would have been peer dependencies defined in optimize-css-assets-webpack-plugin
. I'm going to explicitly add postcss
to the dev dependencies to prevent the issue from reoccurring in the future.
from svelte-webpack-starter.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-webpack-starter.