Commit 8897a660 authored by YIyiyi's avatar YIyiyi

pref:修改配置文件

parent 7198af5d
...@@ -8,6 +8,7 @@ const productionGzipExtensions = ["js", "css"]; ...@@ -8,6 +8,7 @@ const productionGzipExtensions = ["js", "css"];
const isDev = process.env.NODE_ENV === "development"; const isDev = process.env.NODE_ENV === "development";
const FileManagerPlugin = require("filemanager-webpack-plugin"); // 压缩文件夹 const FileManagerPlugin = require("filemanager-webpack-plugin"); // 压缩文件夹
let plugins = []; let plugins = [];
// 避免打本地启项目时自动打zip包
if (!isDev) { if (!isDev) {
plugins.push( plugins.push(
new FileManagerPlugin({ new FileManagerPlugin({
...@@ -49,6 +50,9 @@ const assetsCDN = { ...@@ -49,6 +50,9 @@ const assetsCDN = {
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin; .BundleAnalyzerPlugin;
module.exports = { module.exports = {
publicPath: "./",
// 打包目录--多加一层dist打zip时候把dist外壳打进去
outputDir: "dist/dist",
devServer: { devServer: {
disableHostCheck: true, disableHostCheck: true,
port: 8080, port: 8080,
...@@ -101,9 +105,6 @@ module.exports = { ...@@ -101,9 +105,6 @@ module.exports = {
}, },
}, },
}, },
publicPath: "./",
// publicPath: process.env.VUE_APP_PUBLIC_PATH,
outputDir: "dist/dist",
assetsDir: "static", assetsDir: "static",
productionSourceMap: false, productionSourceMap: 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