【发布时间】:2020-12-01 14:04:12
【问题描述】:
目前我有这个next.config.js:
const withCSS = require('@zeit/next-css')
const withLess = require('@zeit/next-less')
const withSass = require('@zeit/next-sass')
if (typeof require !== 'undefined') {
require.extensions['.less'] = () => {}
}
module.exports = withCSS(
withLess(
withSass({
lessLoaderOptions: {
javascriptEnabled: true,
},
})
)
)
我正在尝试使用 react-rce,但在 the docs 中,他们说我需要将 style-loader 添加到我的 webpack 配置中。
例如
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
但我不明白如何将它添加到我当前的文件中。有什么想法吗?
谢谢
【问题讨论】:
标签: webpack next.js webpack-style-loader