1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- const path = require('path')
- function resolve (dir) {
- return path.join(__dirname, dir)
- }
- module.exports = {
-
-
- productionSourceMap: false,
-
-
- configureWebpack: config => {
-
- if (process.env.NODE_ENV === 'production') {
- config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
- }
- },
- chainWebpack: (config) => {
- config.resolve.alias
- .set('@$', resolve('src'))
- .set('@api', resolve('src/api'))
- .set('@assets', resolve('src/assets'))
- .set('@comp', resolve('src/components'))
- .set('@views', resolve('src/views'))
- .set('@layout', resolve('src/layout'))
-
- config.module
- .rule('markdown')
- .test(/\.md$/)
- .use()
- .loader('file-loader')
- .end()
- },
- css: {
- loaderOptions: {
- less: {
- modifyVars: {
-
- 'primary-color': '#1890FF',
- 'link-color': '#1890FF',
- 'border-radius-base': '4px'
- },
- javascriptEnabled: true
- }
- }
- },
- devServer: {
- port: 3000,
- proxy: {
-
- '/jeecg-boot': {
- target: 'http://127.0.0.1:8090',
- ws: false,
- changeOrigin: true
- }
- }
- },
- lintOnSave: undefined
- }
|