1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- const fs = require('fs');
- // const copywebpackplugin = require('copy-webpack-plugin');
- // const { name } = require("./package.json");
- const name = 'dist';
- // publicPath = process.env.NODE_ENV === "development" ? "/" : `/${name}`;
- publicPath = '/';
- module.exports = {
- publicPath: publicPath, //相对路径
- outputDir: name, //打包名称
- // assetsDir: `${pagesInfo.outputDir}/assets`,
- productionSourceMap: false,
- lintOnSave: false, //关闭lint代码
- css: {
- loaderOptions: {
- less: {
- javascriptEnabled: true,
- },
- },
- },
- devServer: {
- historyApiFallback: {
- // rewrites: pagesInfo.devServerPath,
- },
- port: 9906,
- proxy: {
- "/duoduo-service": {
- target: "http://api.sagacloud.cn",
- changeOrigin: true,
- secure: false,
- }
- }
- },
- chainWebpack: (config) => {
- // config
- // .plugin('copy')
- // .use(copywebpackplugin, [
- // [{
- // from: 'src/public',
- // to: 'public',
- // toType: 'dir',
- // }],
- // ]);
- },
- };
|