| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- export default {
- mode: 'universal',
- /*
- ** Headers of the page
- */
- head: {
- title: process.env.npm_package_name || '',
- meta: [
- { name: "referrer", content: "same-origin"},
- { charset: 'utf-8' },
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
- { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
- ],
- script: [
- {
- src: '/qrcode.js'
- }
- ]
- },
- telemetry: false,
- /*
- ** Customize the progress-bar color
- */
- loading: false,
- /*
- ** Global CSS
- */
- css: [
- '~/assets/css/common.css',
- { src: 'element-ui/lib/theme-chalk/index.css' }
- ],
- // router: {
- // middleware: 'i18n'
- // },
- router: {
- middleware: 'i18n'
- },
- /*
- ** Plugins to load before mounting the App
- */
- plugins: [
- { src: '~plugins/element-ui', ssr: true },
- { src: '~plugins/set-DOMPurify.js', ssr: true },
- { src: '~plugins/baidu-map', ssr: false },
- '~/plugins/axios',
- '~/plugins/util',
- '~/plugins/i18n.js',
- '~/plugins/route.client.js' // only in client side
- ],
- generate: {
- routes: ['/', '/about', '/zh_CN', '/zh_CN/about']
- },
- /*
- ** Nuxt.js dev-modules
- */
- buildModules: [
- ],
- /*
- ** Nuxt.js modules
- */
- modules: [
- // Doc: https://axios.nuxtjs.org/usage
- '@nuxtjs/axios',
- '@nuxtjs/proxy'
- ],
- /*
- ** Axios module configuration
- ** See https://axios.nuxtjs.org/options
- */
- axios: {
- },
- /*
- ** Build configuration
- */
- build: {
- vendor: ['element-ui'], // 添加模块,配置只打包一次,减少应用bundle的体积
- extractCSS: { allChunks: true },
- babel: {
- plugins: [
- ["component", { "libraryName": "element-ui", "styleLibraryName": "theme-chalk" }]
- ]
- },
- /*
- ** You can extend webpack config here
- */
- extend (config, ctx) {
- },
- }
- }
|