vue2-client 1.18.49 → 1.18.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/vue.config.js CHANGED
@@ -62,11 +62,6 @@ module.exports = {
62
62
  target: 'http://127.0.0.1:9012',
63
63
  changeOrigin: true
64
64
  },
65
- '/api/af-revenue/': {
66
- pathRewrite: { '^/api/af-revenue/': '/' },
67
- target: 'http://127.0.0.1:9026',
68
- changeOrigin: true
69
- },
70
65
  // '/api/af-system/resource': {
71
66
  // pathRewrite: { '^/api/af-system': '/' },
72
67
  // target: testUpload,
@@ -132,7 +127,7 @@ module.exports = {
132
127
  target: OSSServerDev,
133
128
  pathRewrite: { '^/oss': '/' },
134
129
  changeOrigin: true
135
- },
130
+ }
136
131
  },
137
132
  client: {
138
133
  overlay: false
@@ -147,19 +142,17 @@ module.exports = {
147
142
  configureWebpack: config => {
148
143
  config.devtool = 'inline-source-map'
149
144
  // 忽略.md文件
150
- config.module.rules.push(
151
- {
152
- test: /\.md$/,
153
- exclude: /node_modules/,
154
- use: 'ignore-loader'
155
- }
156
- )
145
+ config.module.rules.push({
146
+ test: /\.md$/,
147
+ exclude: /node_modules/,
148
+ use: 'ignore-loader'
149
+ })
157
150
  config.context = path.resolve(__dirname, './')
158
151
  config.resolve = {
159
152
  extensions: ['.js', '.vue', '.json'],
160
153
  alias: {
161
154
  '@vue2-client': path.resolve('src'),
162
- '@': path.resolve('src'),
155
+ '@': path.resolve('src')
163
156
  }
164
157
  }
165
158
  config.entry.app = ['core-js/stable', 'regenerator-runtime/runtime', 'whatwg-fetch', './src/main.js']
@@ -177,23 +170,26 @@ module.exports = {
177
170
  )
178
171
  }
179
172
  // Ignore all locale files of moment.js
180
- config.plugins.push(new webpack.IgnorePlugin({
181
- resourceRegExp: /^\.\/locale$/,
182
- contextRegExp: /moment$/
183
- }))
184
-
185
173
  config.plugins.push(
174
+ new webpack.IgnorePlugin({
175
+ resourceRegExp: /^\.\/locale$/,
176
+ contextRegExp: /moment$/
177
+ })
186
178
  )
187
179
 
180
+ config.plugins.push()
181
+
188
182
  // 生产环境下将资源压缩成gzip格式
189
183
  if (isProd) {
190
184
  // add `CompressionWebpack` plugin to webpack plugins
191
- config.plugins.push(new CompressionWebpackPlugin({
192
- algorithm: 'gzip',
193
- test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
194
- threshold: 10240,
195
- minRatio: 0.8
196
- }))
185
+ config.plugins.push(
186
+ new CompressionWebpackPlugin({
187
+ algorithm: 'gzip',
188
+ test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
189
+ threshold: 10240,
190
+ minRatio: 0.8
191
+ })
192
+ )
197
193
  }
198
194
  // if prod, add externals
199
195
  // if (isProd) {
@@ -203,31 +199,33 @@ module.exports = {
203
199
  chainWebpack: config => {
204
200
  // 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
205
201
  if (isProd) {
206
- config.optimization.minimizer('css').use(CssMinimizerPlugin, [{
207
- minimizerOptions: {
208
- preset: [
209
- 'default',
210
- {
211
- discardComments: { removeAll: true },
212
- colormin: false,
213
- }
214
- ],
215
- ignoreOrder: true
202
+ config.optimization.minimizer('css').use(CssMinimizerPlugin, [
203
+ {
204
+ minimizerOptions: {
205
+ preset: [
206
+ 'default',
207
+ {
208
+ discardComments: { removeAll: true },
209
+ colormin: false
210
+ }
211
+ ],
212
+ ignoreOrder: true
213
+ }
216
214
  }
217
- }])
215
+ ])
218
216
  }
219
217
  config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
220
218
  },
221
219
  css: {
222
220
  extract: !isProd
223
221
  ? {
224
- filename: 'css/[name].css',
225
- chunkFilename: 'css/[name].css',
226
- ignoreOrder: true
227
- }
222
+ filename: 'css/[name].css',
223
+ chunkFilename: 'css/[name].css',
224
+ ignoreOrder: true
225
+ }
228
226
  : {
229
- ignoreOrder: true
230
- },
227
+ ignoreOrder: true
228
+ },
231
229
  loaderOptions: {
232
230
  less: {
233
231
  lessOptions: {