Nemo's Parental Misguidance
    Have ideas to improve npm?Join in the discussion! »

    build-plugin-stark-module
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.2 • Public • Published

    build-plugin-stark-module

    Plugin for icestark-module

    Usage

    // build.json
    {
      "plugins": [
    +    ["build-plugin-stark-module", {
          // ...options
        }]
      ]
    }

    Options:

    • outputDir: final build dir
    • modules: entries of multi-moudles, default { "index": "src/index" }
    {
      "plugins": [
        ["build-plugin-stark-module", {
          "modules": {
            "branch-detail": "./src/branch-detail/index.tsx",
            "edit-info": "./src/edit-info/index.tsx"
          }
        }]
      ]
    }
    • moduleExternals: see webpack externals, used to optimize loading performance for micro modules.

    ···json { "plugins": [ ... ["build-plugin-stark-module", { "moduleExternals": { "react": { "root": "React", "url": "https://g.alicdn.com/code/lib/react/16.14.0/umd/react.production.min.js", }, "react-dom": { "root": "ReactDOM", "url": "https://g.alicdn.com/code/lib/react-dom/16.14.0/umd/react-dom.production.min.js" } } }], ... ] }

    
    - `filenameStrategy`: how to name output, default to `./[name]/index`
    
    - `minify`: see [minify](https://ice.work/docs/guide/basic/build#minify)
    
    - `sourceMap`: see [sourceMap](https://ice.work/docs/guide/basic/build#sourceMap)
    
    - `library`: custom name for umd resouces
    

    Keywords

    none

    Install

    npm i build-plugin-stark-module

    DownloadsWeekly Downloads

    2

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    24.4 kB

    Total Files

    26

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar