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

Style field from package.json not respected #683

Closed
shravan2x opened this issue Feb 26, 2018 · 0 comments · Fixed by #1099
Closed

Style field from package.json not respected #683

shravan2x opened this issue Feb 26, 2018 · 0 comments · Fixed by #1099

Comments

@shravan2x
Copy link

What is the current behavior?

When @import-ing a package (blueprintjs/core) from a CSS file, the "style" field from the package's package.json file is not used. So JS files are read and this error occurs:

VM71158:1 Uncaught Error: Module build failed: ModuleBuildError: Module build failed: Unknown word (6:1)

  4 |  * Licensed under the terms of the LICENSE file distributed with this project.
  5 |  */
> 6 | export * from "./accessibility";
    | ^
  7 | export * from "./common";
  8 | export * from "./components";
  9 | 

    at runLoaders ...

If the current behavior is a bug, please provide the steps to reproduce.

I've uploaded a full reproduction at https://github.com/shravan2x/cssLoader-bug-styleUnrecgonized. Just do

  1. npm install
  2. npm start
  3. The result files will be in dist. My repro does not include a webserver in the interest of keeping it simple, but just opening the app.[hash].js file in a text editor will make the error clear.

What is the expected behavior?

The "style" field in the package.json file is read and the respective CSS file is imported.

NPM version: 5.6
Node.JS version: 8.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants