12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- const path = require('path');
- function resolve(dir = '') {
- return path.join(__dirname, './src', dir);
- }
- module.exports = {
- publicPath: './',
- outputDir: 'dist',
- assetsDir: 'static',
- productionSourceMap: false,
- devServer: {
- //九键输入法的 「mall」= 「6255」
- port: 6255,
- proxy: {
- '/wx': {
- target: 'https://www.cityihealth.com/litemall/'
- },
- },
- },
- chainWebpack: config => {
- config.plugins.delete('prefetch');
- config.plugins.delete('preload');
- },
- configureWebpack: {
- resolve: {
- alias: {
- core: resolve('core')
- }
- },
- optimization: {
- runtimeChunk: {
- name: entrypoint => `runtime~${entrypoint.name}`
- },
- splitChunks: {
- minChunks: 2,
- minSize: 20000,
- maxAsyncRequests: 20,
- maxInitialRequests: 30,
- name: false
- }
- }
- },
- css: {
- loaderOptions: {
- sass: {
- data:
- '@import "@/assets/scss/_var.scss";@import "@/assets/scss/_mixin.scss";'
- }
- }
- }
- };
|