-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack error on .scss when using preact build
#59
Comments
@jonburger just to narrow things down, does this happen if you do |
|
@jonburger which npm/node versions are you using? |
|
The |
So is the current suggestion for this version of preact-cli, that if prerendering is important then Is there anything in the roadmap that would address these issues? Also with Webpack's announcement of it's plan for making CSS a "first-class citizen" in that couple of days (I can't say I fully understanding the bulk of the Medium article) does that mean things will get easier in regards to prerendering? |
@jonburger currently we're working on prerendering using webpack bundled code which would mean that anything that is valid in webpack is valid in prerendering. 😄 |
@rkostrzewski sounds good! 😁 |
Support for this landed in |
So, I tried to add SASS support - like others I needed to
npm install sass-loader node-sass postcss -D
- I also needed to update the import toimport './style/index.scss'
Now, when I
npm run build
everything seems to generate just fine except theindex.html
page - it contains the same error as the console, which is...Googling this error brings up lots of finger pointing at Webpack in one way or another - in particular it's an issue with SSR I think is the gist of it:
webpack-contrib/sass-loader#69
webpack/webpack#1754
react-toolbox/react-toolbox#662
It would appear that the
.scss
module is being interpreted as.js
when it is loaded for SSR and it then fails - that's about as much as I can figure out.The text was updated successfully, but these errors were encountered: