|
@@ -4,12 +4,35 @@ const devServerPort = 28888;
|
|
|
const stageServerPort = 28889;
|
|
|
module.exports = {
|
|
|
|
|
|
- publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
|
|
+ publicPath: process.env.NODE_ENV === "production" ? "/" : "/wanda-adm/",
|
|
|
|
|
|
outputDir: "wanda-adm",
|
|
|
+
|
|
|
+ configureWebpack: {
|
|
|
+ module: {
|
|
|
+ rules: [{
|
|
|
+ test: /\.(ttf|otf|eot|woff|woff2)$/,
|
|
|
+ use: {
|
|
|
+ loader: "file-loader",
|
|
|
+ options: {
|
|
|
+ name: "fonts/[name].[ext]",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
|
|
+ loader: 'url-loader',
|
|
|
+ options: {
|
|
|
+ limit: 10000,
|
|
|
+ name: ('fonts/[name].[ext]')
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
+
|
|
|
lintOnSave: process.env.NODE_ENV === "development",
|
|
|
- productionSourceMap: false,
|
|
|
+ productionSourceMap: true,
|
|
|
devServer: {
|
|
|
port: devServerPort,
|
|
|
open: true,
|
|
@@ -20,7 +43,7 @@ module.exports = {
|
|
|
progress: false,
|
|
|
proxy: {
|
|
|
[process.env.VUE_APP_BASE_API]: {
|
|
|
- target: `http://127.0.0.1:${stageServerPort}/mock-api/v1`,
|
|
|
+ target: `http://127.0.0.1:${ stageServerPort }/mock-api/v1`,
|
|
|
changeOrigin: true,
|
|
|
ws: true,
|
|
|
pathRewrite: {
|
|
@@ -79,6 +102,7 @@ module.exports = {
|
|
|
pluginOptions: {
|
|
|
"style-resources-loader": {
|
|
|
preProcessor: "scss",
|
|
|
+
|
|
|
patterns: [
|
|
|
path.resolve(__dirname, "src/styles/_variables.scss"),
|
|
|
path.resolve(__dirname, "src/styles/_mixins.scss")
|
|
@@ -87,6 +111,19 @@ module.exports = {
|
|
|
},
|
|
|
|
|
|
chainWebpack(config) {
|
|
|
+ config.module
|
|
|
+ .rule("fonts")
|
|
|
+ .test(/\.(ttf|otf|eot|woff|woff2)$/)
|
|
|
+ .use("file-loader")
|
|
|
+ .loader("file-loader")
|
|
|
+ .tap(options => {
|
|
|
+ options = {
|
|
|
+
|
|
|
+ name: 'fonts/[name].[ext]',
|
|
|
+ }
|
|
|
+ return options
|
|
|
+ })
|
|
|
+ .end()
|
|
|
|
|
|
|
|
|
|