parcel (另一个打包工具)知识点

  • ParcelJS 本身是 0 配置的,但 HTML、JS 和 CSS 分别是通过 posthtml、babel 和 postcss 处理的,所以我们得分别配 .posthtmlrc、.babelrc 和 .postcssrc。

  • 问题:CSS模块没有起作用
    解决:

  1. 在项目中安装包:postcss-modules
  2. 在文件 .postcssrc 中添加:
{
  "modules": true
}
原文地址:https://www.cnblogs.com/cag2050/p/8474602.html