123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const path = require('path')
- const isProdMode = Object.is(process.env.NODE_ENV, 'production')
- const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.ubtob.com/' : 'https://test-sso-server.uuzcc.cn/')
- module.exports = {
- router: {
- middleware: 'check-auth'
- },
- transition: {
- name: 'fade',
- mode: 'out-in'
- },
-
- head: {
- title: '账户中心',
- meta: [{
- charset: 'utf-8'
- },
- {
- 'http-equiv': 'X-UA-Compatible',
- content: 'IE=edge,chrome=1'
- },
- {
- name: 'render',
- content: 'webkit'
- },
- {
- name: 'viewport',
- content: 'width=device-width, initial-scale=1'
- },
- {
- hid: 'description',
- name: 'description',
- content: '账户中心'
- }
- ],
- link: [{
- rel: 'icon',
- type: 'image/x-icon',
- href: '/U.png'
- }]
- },
-
- loading: '~components/common/nuxt-loading/Loading.vue',
-
- build: {
-
- extractCSS: {
- allChunks: true
- },
- extend(config, {
- dev,
- isClient,
- isServer
- }) {
- Object.assign(config.resolve.alias, {
- '~utils': path.resolve(__dirname, 'utils'),
- '~components': path.join(__dirname, 'components'),
- '~assets': path.join(__dirname, 'assets'),
- '~plugins': path.join(__dirname, 'plugins'),
- '~store': path.join(__dirname, 'store')
- })
-
-
- for (let i = 0; i < config.plugins.length; i++) {
- if (config.plugins[i] && config.plugins[i].options && config.plugins[i].options.minify) {
- config.plugins[i].options.minify = {
- removeAttributeQuotes: true,
- collapseWhitespace: true,
- html5: true,
- minifyCSS: true,
- removeComments: true,
- removeEmptyAttributes: true,
- }
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- },
- vendor: [
- 'axios',
- 'element-ui',
- 'mint-ui',
- 'vuerify',
- 'vee-validate'
- ],
- babel: {
- presets: ['@nuxt/babel-preset-app']
- }
-
-
-
-
-
- },
- css: [{
- src: '~assets/scss/mobileCommon.scss',
- lang: 'scss'
- },
- {
- src: '~assets/scss/app.scss',
- lang: 'scss'
- }
- ],
- dev: !isProdMode,
- env: {
- baseUrl,
- },
- plugins: [
-
-
-
-
-
-
- {
- src: '~plugins/element-ui.js'
- }, {
- src: '~plugins/mint-ui.js'
- }, {
- src: '~plugins/filters.js',
- ssr: false
- }, {
- src: '~plugins/jsonp.js',
- ssr: false
- }, {
- src: '~plugins/vuerify.js',
- ssr: false
- }, {
- src: '~plugins/vee-validate.js',
- ssr: true
- }
- ],
-
- proxyTable: ['/api/**', '/login/**', '/user**', '/logout**', '/sso/**', '/appeal/**', '/update/user/**', '/valid/**', '/im/**', '/weChat/**', '/bh/**', '/foreign/**']
- }
|