38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
const DynamicPublicPathPlugin = require("./webpack.plugins/dynamic-public-path");
|
|
const Base64ImagePlugin = require("./webpack.plugins/inline-base64-loader");
|
|
|
|
module.exports = {
|
|
publicPath: "", // 修改为带有基本路径
|
|
|
|
configureWebpack: {
|
|
node: false, // remove buffer polyfill
|
|
plugins: [new DynamicPublicPathPlugin(), new Base64ImagePlugin()],
|
|
},
|
|
chainWebpack: (config) => {
|
|
config.plugin("html").tap((args) => {
|
|
args[0].inject = false; // ❗️禁用 Vue CLI 自动注入资源
|
|
args[0].template = "./public/index.html"; // 使用你自己的模板
|
|
args[0].title = "Socket.IO Admin For OAK";
|
|
return args;
|
|
});
|
|
config.plugin("define").tap((args) => {
|
|
const version = require("./package.json").version;
|
|
args[0]["process.env"]["VERSION"] = JSON.stringify(version);
|
|
return args;
|
|
});
|
|
// exclude moment package (included by chart.js@2)
|
|
config.externals({ moment: "moment" });
|
|
},
|
|
|
|
pluginOptions: {
|
|
i18n: {
|
|
locale: "zh-CN",
|
|
fallbackLocale: "en",
|
|
localeDir: "locales",
|
|
enableInSFC: false,
|
|
},
|
|
},
|
|
|
|
transpileDependencies: ["vuetify"],
|
|
};
|