包裹捆扎机中的邮政编码不起作用;未使用CSS模块



我正在使用Parcel-bundler@1.12.3,与npm一起安装。

我的CSS是通用的纯CSS,没有模块或SASS或任何使用的东西。

";包裹索引.html";工作非常完美。

然而,当运行";package build index.html--没有内容散列--输出目录public--没有缓存--没有源映射--public url/&";,package开始自动安装postpass和所有依赖项。然后抛出这个错误。

我已经尝试禁用我所有的原始CSS,并为我的index.html使用一个伪CSS,这个问题仍然存在。

test.css

body {
background-image: linear-gradient(90deg, #303133, #303133);
font-family: 'Open Sans', sans-serif;
font-weight: 200;
min-height: 100vh;
margin: 0;
color: #d3d3d3;
}

错误:

C:\Users。。。\frontend\styles\test.css:undefined:undefined:插件不是函数在LazyResult.run(C:\Users…\node_modules\package bundler\node_modeles\postpass\lib\lazy-result.js:288:14(在LazyResult.asyncTick(C:\Users…\node_modules\package bundler\node_modeles\postpass\lib\lazy-result.js:21:26(在C:。。。\node_modules\package bundler\node_modules \postss\lib\lazy-result.js:254:14 at new Promise((在LazyResult.async(C:\Users…\node_modules\package bundler\node_modeles\postpass\lib\lazy-result.js:250:23(在LazyResult.then(C:\Users…\node_modules\package bundler\node_modeles\postpass\lib\lazy-result.js:131:17(

控制台中的错误消息

面临同样的问题并能够解决

我在node_modules/parcel-bundler/中将postcss重新安装到版本8.2.7

就我而言,

cd C:/Program Files/nodejs/node_modules/parcel-bundler
npm i postcss@8.2.7

我的style.scss文件已成功构建

最新更新