DESKTOP-4G80JF4\long 3 years ago
parent
commit
98a30425f2
1 changed files with 22 additions and 21 deletions
  1. 22 21
      operationSupport/vue.config.js

+ 22 - 21
operationSupport/vue.config.js

@@ -35,33 +35,34 @@ module.exports = {
             });
         // 配置每次打包浏览器缓存文件名的随机性
         const filename = path.posix.join('js', `${new Date().getTime()}_[name].js`);
-        config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename)
+        config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename);
     },
     // 配置全局样式变量
     css: {
         loaderOptions: {
-            // sass: {
-            //   data: '@import "@/assets/styles/common/px2rem.scss";@import "@/assets/styles/common/mixins.scss";'
-            // },
-            // postcss: {
-            //     plugins: [
-            //         require('postcss-pxtorem')({
-            //             rootValue: 100, // 换算的基数
-            //             selectorBlackList: ['weui', 'mu'], // 忽略转换正则匹配项
-            //             propList: ['*']
-            //         })
-            //     ]
-            // }
-            // scss: generateLoaders('sass').concat({
-            //     loader: 'sass-resources-loader',
-            //     options: {
-            //         resources: path.relative(__dirname, '../src/assets/css/punlic-style.scss')
+            //     sass: {
+            //       data: '@import "@/assets/styles/common/px2rem.scss";@import "@/assets/styles/common/mixins.scss";'
+            //     },
+            //     postcss: {
+            //         plugins: [
+            //             require('postcss-pxtorem')({
+            //                 rootValue: 100, // 换算的基数
+            //                 selectorBlackList: ['weui', 'mu'], // 忽略转换正则匹配项
+            //                 propList: ['*']
+            //             })
+            //         ]
             //     }
-            // })
-        // }
-        extract: { // 打包后css文件名称添加时间戳
+            //     scss: generateLoaders('sass').concat({
+            //         loader: 'sass-resources-loader',
+            //         options: {
+            //             resources: path.relative(__dirname, '../src/assets/css/punlic-style.scss')
+            //         }
+            //     })
+        },
+        extract: {
+            // 打包后css文件名称添加时间戳
             filename: `css/[name].${new Date().getTime()}.css`,
-            chunkFilename: `css/chunk.[id].${new Date().getTime()}.css`,
+            chunkFilename: `css/chunk.[id].${new Date().getTime()}.css`
         }
     },
     configureWebpack: {