add webpack project
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -42,7 +42,7 @@ package-lock.json
|
||||
# Third-part Files #
|
||||
**/node_modules/*
|
||||
dist/node_modules/*
|
||||
webpack/*
|
||||
webpack/node_modules/*
|
||||
**/bower_components/*
|
||||
**/src/vendors/*
|
||||
|
||||
|
||||
16
webpack/package.json
Normal file
16
webpack/package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "dist",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"webpack": "^5.70.0",
|
||||
"webpack-cli": "^4.9.2"
|
||||
}
|
||||
}
|
||||
17
webpack/webpack.config.js
Normal file
17
webpack/webpack.config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const path = require("path");
|
||||
const resolve = (dir) => path.join(__dirname, dir);
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
address_parse: [
|
||||
"../dist/pcasCode.js",
|
||||
"../dist/zipCode.js",
|
||||
"../dist/address_parse.js",
|
||||
],
|
||||
},
|
||||
output: {
|
||||
filename: "[name].min.js",
|
||||
path: resolve("../dist/min"),
|
||||
clean: true,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user