gpt4 book ai didi

CSS 加载器 : Unexpected token of css coming from node module

转载 作者:太空宇宙 更新时间:2023-11-03 22:51:05 25 4
gpt4 key购买 nike

我将用 Github 问题风格解释我的问题:

当前行为是什么?

无法加载 CSS。完整的错误消息: error

如果当前行为是一个错误,请提供重现步骤。
我的package.json:https://gist.github.com/jy95/99377c113252e6baaa23087abe859814
我的 webpack.config.js :https://gist.github.com/jy95/16b0f03d46b087c6f2640c8e9178914f

请提供其他相关信息,例如浏览器版本、Node.js 版本、webpack 版本和操作系统。
Node :6.10.3
操作系统:Windows 10

PS:在您告诉我使用 ExtractTextPlugin 进行查看之前,我想解释一下为什么会出现此错误(我还尝试在我的条目中要求 css:app.js ,结果相同)

最佳答案

您已在 webpack.config.js 中排除了 css-loadernode_modules。可能您必须包含需要处理的 node_modules 中的那些路径。像这样的事情:

{
test: /\.css$/,
use: 'css-loader',
exclude: /node_modules/,
include: [
'node_modules/admin-lte/dist/css/skins/skin-blue.min.css',
<place here others you need>
],
}

可能会出现一些有关根文件夹的问题,请自行检查您的系统。

关于CSS 加载器 : Unexpected token of css coming from node module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43850677/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com