From 08d6f0e391f7844673202553224248060241c2fa Mon Sep 17 00:00:00 2001 From: wangzhichao <570738205@qq.com> Date: Mon, 6 Jun 2022 09:17:17 +0800 Subject: [PATCH] add webpack project --- .gitignore | 2 +- webpack/package.json | 16 ++++++++++++++++ webpack/webpack.config.js | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 webpack/package.json create mode 100644 webpack/webpack.config.js diff --git a/.gitignore b/.gitignore index 1cb37a0..36193b7 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,7 @@ package-lock.json # Third-part Files # **/node_modules/* dist/node_modules/* -webpack/* +webpack/node_modules/* **/bower_components/* **/src/vendors/* diff --git a/webpack/package.json b/webpack/package.json new file mode 100644 index 0000000..276c703 --- /dev/null +++ b/webpack/package.json @@ -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" + } +} diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js new file mode 100644 index 0000000..8fac4ec --- /dev/null +++ b/webpack/webpack.config.js @@ -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, + }, +};