module-spring-webpack-plugin

1.0.3 • Public • Published

usage:

npm install module-spring-webpack-plugin --save-dev

add this plugin entity to webpack config. ex:

plugins: [new ModuleSpringWebpackPlugin()]

you can set modules map during set plugin,ex

plugins: [new ModuleSpringWebpackPlugin({
  "MyData2": "./test/myData2.js",
  "MyData": "@/myData.js"
})]

or add webpack-spring.config.js in project root dir. ex:

module.exports = {
  "MyData2": "./test/myData2.js",
  "MyData": "@/myData.js"
};

then you can import the module like this:

import { data1 } from "@spring/MyData";
import { data2 } from "@spring/MyData2";
console.log("data1", data1);
console.log("data2", data2);

Dependencies (0)

    Dev Dependencies (13)

    Package Sidebar

    Install

    npm i module-spring-webpack-plugin

    Weekly Downloads

    2

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    16.3 kB

    Total Files

    5

    Last publish

    Collaborators

    • hzpsky2008