Skip to content
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

expected "indent", got "keyframes" when importing css and using webpackImporter #297

Closed
alan-agius4 opened this issue Dec 2, 2020 · 0 comments · Fixed by #298
Closed

Comments

@alan-agius4
Copy link

  • Operating System: MAC OSX
  • Node Version: v12.16.2
  • NPM Version: n/a
  • webpack Version: 5.9.0
  • stylus-loader Version: 4.3.0

Expected Behavior

At the moment in version 4 when using the webpackImporter option it seems to be impossible to import a .css file in a .styl file, as this will result in an error because of the .css file contents will be a JavaScript module. Previously in version 3 this used to work.

Example

@import "~bootstrap-stylus/lib/bootstrap";
@import "@angular/material/prebuilt-themes/indigo-pink.css";

Will result in the below error.

Actual Behavior

ERROR in ./styles.styl (./node_modules/css-loader/dist/cjs.js!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./styles.styl)
Module Error (from ./node_modules/stylus-loader/dist/cjs.js):
expected "indent", got "keyframes"
 @ ./styles.styl 2:12-157 9:17-24 13:15-29
 @ ./index.js 1:0-22

How Do We Reproduce?

git clone https://github.com/alan-agius4/stylus-loader-importer.git
cd stylus-loader-importer
yarn
yarn webpack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant