[Webpack] Invalid CSS after "@include mixins"
See original GitHub issueBug report
Hello, I try to pack mdc with Webpack and Typscript.
In Version 4.0.0 I get this error:
ERROR in [at-loader] ./node_modules/@material/auto-init/index.d.ts:38:16
TS2528: A module cannot have multiple default exports.
This is fixed by Version: “^5.0.0-canary.faa9af310.0” But now I have the error:
ERROR in ./src/frontend/sass/main.scss
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after "@include mixins": expected 1 selector or at-rule, was ".core-styles;"
on line 24 of node_modules/@material/button/mdc-button.scss
Steps to reproduce
1 Create a Example Project like this. https://github.com/material-components/material-components-web/blob/master/docs/getting-started.md 2. update mdc: npm i material-components-web@5.0.0-canary.faa9af310.0 3. run npm: npm start
Your Environment:
Software | Version(s) |
---|---|
MDC Web | 5.0.0-canary.faa9af310.0 |
Browser | chrome |
Operating System | Debian 10 |
Possible solution
The only way to fix both problems, go to version 2.3.1.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:21 (6 by maintainers)
Top Results From Across the Web
SassError: Invalid CSS after "@include mat": expected 1 ...
I fixed it by removing node sass all together. npm uninstall node-sass.
Read more >sasserror: invalid css after - You.com | The search engine you ...
When you use @import with SCSS you get one stylesheet copied into your primary styles. As this happens before the compile is complete...
Read more >Sass: @use
The @use rule loads mixins, functions, and variables from other Sass stylesheets, and combines CSS from multiple stylesheets together.
Read more >sass-loader - webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Using @use With Sass and Webpack
"Sass extends CSS's @import rule with the ability to import Sass and CSS ... SassError: Invalid CSS after "...y-bg: variables": expected ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was getting
and fixed it by removing
node-sass
and installingsass@1.25.0
.I created full working example with some of the popular bundlers: Webpack, Rollup & Snowpack.