我只想导入一个 css 文件(import './index.css'),但是样式加载器抛出错误:
jectStylesIntoStyleTag.js:74未捕获的RangeError:在对象的./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js.module.exports(injectStylesIntoStyleTag.js:227)处的addModulesToDom(injectStylesIntoStyleTag.js:74)处的数组长度无效。 ./app/components/editor/index.css (index.css?033a:16) 在webpack_require (bootstrap:726) 在 fn (bootstrap:100) 在 Module../app/components/editor/index.jsx (index .jsx:1) 在webpack_require (bootstrap:726) 在 fn (bootstrap:100) 在 Module../app/main.js (main.js:1) 在webpack_require (bootstrap:726)
我不知道如何处理它,我的package.json:
{
"name": "webpack-learn",
"version": "1.0.0",
"description": "webpack config lear",
"main": "app/index.js",
"scripts": {
"test": "I don't know what this property means.",
"build": "webpack --config build/webpack.prod.js",
"dev": "webpack-dev-server --config build/webpack.dev.js"
},
"keywords": [
"react",
"typescript",
"frontend",
"blog",
"project",
"component"
],
"author": "xuwentao93",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/preset-react": …Run Code Online (Sandbox Code Playgroud) webpack ×1