var webpack = require("webpack"); /** @type {import("@vue/cli-service").ProjectOptions} */ module.exports = { // 这里设置项目的路径,比如 '/admin' 。设置以后 BASE_URL就有值了。 // 注意这解决不了CDN的问题,CDN的问题要另行研究。 // 可能的方案是另设一个替代 BASE_URL 的环境变量解决 <%%= BASE_URL %%>favicon.ico 和 ${process.env.BASE_URL}service-worker.js publicPath: "/", lintOnSave: process.env.NODE_ENV !== "production" ? true : "error", configureWebpack: { devtool: "source-map", plugins: [ // Ignore all locale files of moment.js // TODO: use webpack stats to check if iview locale matters new webpack.IgnorePlugin(/^\.\/locale$/, /moment|iview$/), ], // sequelize bug: https://github.com/sequelize/sequelize/issues/7509 externals: ["mysql"], }, transpileDependencies: [/\bvue-awesome\b/], pluginOptions: { electronBuilder: { preload: "src/preload.ts", externals: [], productName: "云阅卷", builderOptions: { extraFiles: ["font/**", "imagemagick/**"], win: { target: "portable", signAndEditExecutable: false, publisherName: "启明泰和", publish: { provider: "generic", url: "url", channel: "latest", publishAutoUpdate: false, }, }, }, }, }, };