colas

1.2.0 • Public • Published

colas

creat-react-app 加点料, 默认添加了less-loader

⚠️ 自用,未测试

使用

  • 第一步

    yarn create react-app example
    cd example
    yarn add colas electron electron-builder -D
  • 第二步 修改package.json

    "electron": true,
    "scripts": {
       "start": "colas start",
       "build": "colas build --dir"
       ....
     },
  • 第三步

    yarn start

自定义webpack.config.js

项目根目录下添加webpack.config.js

module.exports = {
  module: (prevModule) => {
    // prevModule 是原始的module配置
    return prevModule;
  },

  // 最终会使用output配置
  output: {
    filename: "bundle.js",
    path: "/home/proj/public/assets",
  },
};

v1.2 对于 css-loader 升级后默认处理 url 路径(https://github.com/facebook/create-react-app/issues/9870)进行了一些修补,使之与以前版本兼容 如果想开启 在 webpack.config.js 添加 enableCSSURL:true

/colas/

    Package Sidebar

    Install

    npm i colas

    Weekly Downloads

    2

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    19.3 kB

    Total Files

    13

    Last publish

    Collaborators

    • y.t