1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- "use strict";
- const path = require("path");
- // const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
- // .BundleAnalyzerPlugin;
- function resolve(dir) {
- return path.join(__dirname, dir);
- }
- const name = "机动车安全及尾气检测"; // page title
- // If your port is set to 80,
- // use administrator privileges to execute the command line.
- // For example, Mac: sudo npm run
- // You can change the port by the following methods:
- // port = 9528 npm run dev OR npm run dev --port = 9528
- const port = process.env.port || process.env.npm_config_port || 9528; // dev port
- // All configuration item explanations can be find in https://cli.vuejs.org/config/
- module.exports = {
- /**
- * You will need to set publicPath if you plan to deploy your site under a sub path,
- * for example GitHub Pages. If you plan to deploy your site to htt6ps://foo.github.io/bar/,
- * then publicPath should be set to "/bar/".
- * In most cases please use '/' !!!
- * Detail: https://cli.vuejs.org/config/#publicpath
- */
- publicPath: "./",
- outputDir: "dist",
- assetsDir: "static",
- lintOnSave: false,
- productionSourceMap: false,
- runtimeCompiler: true,
- devServer: {
- port: port,
- open: false,
- overlay: {
- warnings: false,
- errors: true,
- },
- // proxy: {
- // onProxyReq: function(proxyReq) {
- // proxyReq.removeHeader("origin");
- // }
- // },
- // before: require("./mock/mock-server.js")
- },
- configureWebpack: {
- // provide the app's title in webpack's name field, so that
- // it can be accessed in index.html to inject the correct title.
- name: name,
- resolve: {
- alias: {
- "@": resolve("src"),
- },
- },
- },
- };
|