-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci skip]
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## Frequently Asked Questions | ||
|
||
### How do I enable CSS Modules? | ||
|
||
Use `nwb.config.js` to configure the [default `css` loader for your app's own styles](/docs/Configuration.md#default-loaders) with the necessary [css-loader `query` parameters](https://github.com/webpack/css-loader#local-scope): | ||
|
||
```js | ||
module.exports = { | ||
webpack: { | ||
loaders: { | ||
css: { | ||
modules: true, | ||
localIdentName: ( | ||
process.env.NODE_ENV === 'production' | ||
? '[path][name]-[local]-[hash:base64:5]' | ||
: '[hash:base64:5]' | ||
) | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Why am I seeing `.json.gzip` files in my project root? | ||
|
||
Are you running as root on a Mac, or in a Docker container? | ||
|
||
npm appers to [set the working directory as the temporary directory](https://github.com/npm/npm/issues/4531) in these scenarios and babel-loader writes to the temporary directory to cache results for performance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters