Commit b3ef26c1 authored by fanxuehui's avatar fanxuehui

build:

parent bfb7317e
......@@ -12,3 +12,9 @@
- npm run dev
- npm link 到 demo 项目
### 发布
- npm run build
- 安全性考虑,需要手动上传`[hash].worker.js`文件到苍穹,路径为`/tuia/rip/`
- npm publish
This diff is collapsed.
......@@ -23,6 +23,9 @@
"replay",
"rip"
],
"files": [
"dist"
],
"author": "Dec-F",
"license": "ISC",
"dependencies": {
......@@ -36,6 +39,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"babel-loader": "^8.0.6",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^5.2.0",
"webpack": "^4.35.2",
"worker-loader": "^2.0.0"
......
const path = require("path");
const env = process.env.NODE_ENV;
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
module.exports = {
mode: env === "dev" ? "development" : "production",
entry: {
......@@ -8,7 +9,7 @@ module.exports = {
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
publicPath: "//yun.tuia.cn/",
publicPath: "//yun.tuia.cn/tuia/rip/",
libraryTarget: "umd",
},
resolve: {
......@@ -33,5 +34,6 @@ module.exports = {
},
],
},
plugins: [new CleanWebpackPlugin()],
watch: env === "dev" ? true : false,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment