const { defineConfig } = require('@vue/cli-service') const NodePolyfillPlugin = require('node-polyfill-webpack-plugin') module.exports = defineConfig({ configureWebpack: { plugins: [new NodePolyfillPlugin()] }, transpileDependencies: true, lintOnSave: false, devServer: { historyApiFallback: true, allowedHosts: 'all', proxy: { '/api': { target: 'https://www.gmcyy.com/api/', // target: 'http://api-gmc.localhost.cc/api/', changeOrigin: true, pathRewrite: { '^/api': '' } }, '/adminApi': { target: 'https://www.gmcyy.com/api/', // target: 'http://api-gmc.localhost.cc/api/', changeOrigin: true, pathRewrite: { '^/adminApi': '' } } } }, css: { loaderOptions: { sass: { sassOptions: { outputStyle: 'expanded' }, prependData: '@import "~@/variables.sass"' }, scss: {}, postcss: { postcssOptions: { plugins: [ require('postcss-plugin-px2rem')({ rootValue: 144, minPixelValue: 5, selectorBlackList: ['mobile-h-s'] }) ] } } } } })