Skip to content

Commit

Permalink
Started an FAQ doc
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
insin committed Aug 15, 2016
1 parent fdb22a2 commit 9440c32
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ cd my-module/
- [Plugins](/docs/Plugins.md#plugins)
- [Middleware](/docs/Middleware.md#middleware)
- [Examples](/docs/Examples.md#examples)
- [Frequently Asked Questions](/docs/FAQ.md#frequently-asked-questions)

---

- [Versioning](/docs/Versioning.md#versioning)

## Why use nwb?
Expand Down
28 changes: 28 additions & 0 deletions docs/FAQ.md
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.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
- [Plugins](/docs/Plugins.md#plugins)
- [Middleware](/docs/Middleware.md#middleware)
- [Examples](/docs/Examples.md#examples)
- [Frequently Asked Questions](/docs/FAQ.md#frequently-asked-questions)

---

- [Versioning](/docs/Versioning.md#versioning)

0 comments on commit 9440c32

Please sign in to comment.