auto-import-webpack-plugin v1.0.3
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
License
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago