未验证 提交 a89afc2e 编写于 作者: R Rafael Almeida 提交者: GitHub

Add FAQ section to Built-in CSS Support (#13846)

I added a FAQ section to answer questions I see frequently. Motivation: https://github.com/vercel/next.js/discussions/13625#discussioncomment-23186
上级 2ede86ff
......@@ -42,6 +42,10 @@ In development, expressing stylesheets this way allows your styles to be hot rel
In production, all CSS files will be automatically concatenated into a single minified `.css` file.
### Import styles from `node_modules`
If you’d like to import CSS files from `node_modules`, you must do so inside `pages/_app.js`.
## Adding Component-Level CSS
Next.js supports [CSS Modules](https://github.com/css-modules/css-modules) using the `[name].module.css` file naming convention.
......@@ -200,6 +204,12 @@ export default HelloWorld
Please see the [styled-jsx documentation](https://github.com/zeit/styled-jsx) for more examples.
## FAQ
### Does it work with JavaScript disabled?
Yes, if you disable JavaScript the CSS will still be loaded in the production build (`next start`). During development, we require JavaScript to be enabled to provide the best developer experience with [Fast Refresh](https://nextjs.org/blog/next-9-4#fast-refresh).
## Related
For more information on what to do next, we recommend the following sections:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册