小编Err*_*500的帖子

Warning: Built-in CSS support is being disabled due to custom CSS configuration being detected

I am trying to import "../../node_modules/react-quill/dist/quill.snow.css"; in my next.js project but I get following error

[ error ] ./node_modules/react-quill/dist/quill.snow.css
Global CSS cannot be imported from files other than your Custom <App>. Please move all global CSS imports to pages/_app.js.
Read more: https://err.sh/next.js/css-global
Location: components\crud\BlogCreate.js
Run Code Online (Sandbox Code Playgroud)

I managed to make it work with next.config.js. It worked with this configuration

// next.config.js 
const withCSS = require('@zeit/next-css');

module.exports = withCSS({
  cssLoaderOptions: {
    url: false
  }
});
Run Code Online (Sandbox Code Playgroud)

But now I am getting a warning,

Warning: …
Run Code Online (Sandbox Code Playgroud)

next.js

4
推荐指数
2
解决办法
1万
查看次数

标签 统计

next.js ×1