1.0.3 • Published 12 months ago

auto-import-webpack-plugin v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

auto-import-webpack-plugin

Getting Started

To begin, you'll need to install auto-import-webpack-plugin:

npm install auto-import-webpack-plugin --save-dev

or

yarn add -D auto-import-webpack-plugin

or

pnpm add -D auto-import-webpack-plugin

Then add the plugin to your webpack config. For example:

webpack.config.js

const AutoImport = require("auto-import-webpack-plugin");

module.exports = {
  plugins: [
    new AutoImport({
      entry: ".", // entry path
      output: "auto-import.js", // output path
      library: "element-ui", // library name
      ignore: ".autoignore", // entry ignore files config
      logLevel: true, // log level
    }),
  ],
};

or

import AutoImport from "auto-import-webpack-plugin";

export default {
  plugins: [
    new AutoImport({
      entry: ".", // entry path
      output: "auto-import.js", // output path
      library: "element-ui", // library name
      ignore: ".autoignore", // entry ignore files config
      logLevel: true, // log level
    }),
  ],
};

Then add the scripts to your package.json config. For example:

package.json

"scripts": {
  "generator": "auto-import"
},
"devDependencies": {
  "auto-import-webpack-plugin": "latest"
}

auto-import Description

-h, --help   : cli help
-v, --version: package version
-c, --config : config filename default: 'atconfig.json'

auto-import -c atconfig.json

autoconfig.json

{
  "entry": ".",
  "output": "auto-import.js",
  "library": "element-ui",
  "ignore": ".autoignore",
  "logLevel": true
}

auto-import -c atconfig.js

autoconfig.js

module.exports = {
  entry: ".",
  output: "auto-import.js",
  library: "element-ui",
  ignore: ".autoignore",
  logLevel: true,
};

TypeScript

.d.ts

License

MIT

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago

0.1.17

12 months ago

0.1.16

12 months ago

0.1.15

12 months ago

0.1.14

12 months ago

0.1.13

12 months ago

0.1.12

12 months ago

0.1.11

12 months ago

0.1.11-beta.1

12 months ago

0.1.11-beta.0

12 months ago

0.1.10

12 months ago

0.1.9

12 months ago

0.1.8

12 months ago

0.1.7

12 months ago

0.1.6

12 months ago

0.1.5

12 months ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.2-beta.2

12 months ago

0.0.2-beta.1

12 months ago

0.0.2-beta.0

12 months ago

0.0.1

12 months ago

0.0.1-beta.3

12 months ago

0.0.1-beta.2

12 months ago

0.0.1-beta.1

12 months ago

0.0.1-beta.0

12 months ago