|
|
@@ -0,0 +1,188 @@
|
|
|
+const webpack = require('webpack')
|
|
|
+module.exports = {
|
|
|
+ srcDir: 'src/',
|
|
|
+ // rootDir: './',
|
|
|
+ /*
|
|
|
+ ** Router config
|
|
|
+ */
|
|
|
+ router: {
|
|
|
+ middleware: [
|
|
|
+ 'check-auth'
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ /*
|
|
|
+ ** Headers of the page
|
|
|
+ */
|
|
|
+ head: {
|
|
|
+ title: '市场管理信息系统', //细胞制备系统
|
|
|
+ meta: [{
|
|
|
+ charset: 'utf-8'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'viewport',
|
|
|
+ content: 'width=device-width, initial-scale=1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ hid: 'description',
|
|
|
+ name: 'description',
|
|
|
+ content: '市场管理信息系统'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ link: [{
|
|
|
+ rel: 'icon',
|
|
|
+ type: 'image/x-icon',
|
|
|
+ href: '/favicon.ico'
|
|
|
+ }],
|
|
|
+ script: [{
|
|
|
+ src: '/js/utils.js'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ src: '/js/printUtilities.js'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ /*
|
|
|
+ ** Customize the progress bar color
|
|
|
+ */
|
|
|
+ loading: {
|
|
|
+ color: '#3B8070'
|
|
|
+ },
|
|
|
+ /*
|
|
|
+ ** Build configuration
|
|
|
+ */
|
|
|
+ build: {
|
|
|
+ babel: {
|
|
|
+ plugins: ['transform-decorators-legacy', 'transform-class-properties']
|
|
|
+ },
|
|
|
+ extend(config, {
|
|
|
+ isDev,
|
|
|
+ isClient
|
|
|
+ }) {
|
|
|
+ config.resolve.alias['class-component'] = '@/plugins/class-component'
|
|
|
+ },
|
|
|
+ /*
|
|
|
+ ** Run ESLint on save
|
|
|
+ */
|
|
|
+ // extend (config, ctx) {
|
|
|
+ // if (ctx.dev && ctx.isClient) {
|
|
|
+ // config.module.rules.push({
|
|
|
+ // enforce: 'pre',
|
|
|
+ // test: /\.(js|vue)$/,
|
|
|
+ // loader: 'eslint-loader',
|
|
|
+ // exclude: /(node_modules)/
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ vendor: [
|
|
|
+ // 'axios',
|
|
|
+ 'element-ui',
|
|
|
+ 'negotiator',
|
|
|
+ 'vue-class-component',
|
|
|
+ 'vuex-class',
|
|
|
+ 'vue-i18n',
|
|
|
+ 'vue-chartjs',
|
|
|
+ 'vue-clipboards',
|
|
|
+ 'moment',
|
|
|
+ 'chart.js',
|
|
|
+ 'deepmerge' // vue-chartjs dep
|
|
|
+ ],
|
|
|
+ extractCSS: true,
|
|
|
+ filenames: {
|
|
|
+ vendor: 'vendor.[hash:12].js',
|
|
|
+ app: 'shanlan.[chunkhash:12].js',
|
|
|
+ css: 'shanlan.[contenthash:12].css'
|
|
|
+ },
|
|
|
+ plugins: [
|
|
|
+ new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /zh|en/)
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ /*
|
|
|
+ ** Global CSS
|
|
|
+ */
|
|
|
+ css: [
|
|
|
+ // 'normalize.css/normalize.css',
|
|
|
+ 'element-ui/lib/theme-chalk/index.css',
|
|
|
+ {
|
|
|
+ src: '~assets/styles/main.scss',
|
|
|
+ lang: 'scss'
|
|
|
+ }
|
|
|
+ // {src: '~assets/mstyles/index.scss', lang: 'scss'}
|
|
|
+ ],
|
|
|
+ /*
|
|
|
+ ** Add element-ui in our app, see plugins/element-ui.js file
|
|
|
+ */
|
|
|
+ plugins: [
|
|
|
+ '@/plugins/i18n',
|
|
|
+ '@/plugins/element-ui',
|
|
|
+ // '@/plugins/axios-defaults',
|
|
|
+ {
|
|
|
+ src: '@/plugins/clipboard',
|
|
|
+ ssr: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ src: '@/plugins/error-handler',
|
|
|
+ ssr: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ src: '@/plugins/vue-print-nb',
|
|
|
+ ssr: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
+ modules: [
|
|
|
+ // '@nuxtjs/auth',
|
|
|
+ '~/modules/auth',
|
|
|
+ '@nuxtjs/axios',
|
|
|
+ ],
|
|
|
+ auth: {
|
|
|
+ user: {
|
|
|
+ endpoint: 'users/me',
|
|
|
+ propertyName: '',
|
|
|
+ resetOnFail: true
|
|
|
+ },
|
|
|
+ login: {
|
|
|
+ endpoint: 'auth'
|
|
|
+ },
|
|
|
+ logout: {
|
|
|
+ endpoint: 'auth/logout',
|
|
|
+ method: 'GET'
|
|
|
+ },
|
|
|
+ redirect: {
|
|
|
+ notLoggedIn: '/login',
|
|
|
+ loggedIn: '/'
|
|
|
+ },
|
|
|
+ token: {
|
|
|
+ enabled: true,
|
|
|
+ type: 'Bearer',
|
|
|
+ localStorage: true,
|
|
|
+ name: 'token',
|
|
|
+ cookie: true,
|
|
|
+ cookieName: 'token'
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ axios: {
|
|
|
+
|
|
|
+ /* --------Nuxt Start发版用 START-------------- */
|
|
|
+ baseURL: '/api/'
|
|
|
+ /* --------Nuxt Start发版用 END-------------- */
|
|
|
+
|
|
|
+ },
|
|
|
+ /*
|
|
|
+ ** 客户端和服务端共享的环境变量,
|
|
|
+ ** 客户端使用:process.env.appclient 服务端使用:context.appclient
|
|
|
+ */
|
|
|
+ env: {
|
|
|
+ /* --------Nuxt Start发版用 START-------------- */
|
|
|
+
|
|
|
+ appclient: 'gfgl', //供方信息管理平台
|
|
|
+ upfilehost: '/uploadfile', //附件上传
|
|
|
+ baseURL: '/api/', //本地工作流图片
|
|
|
+ LOCAL_IP: '10.76.248.23' //定义服务器内网IP,word转PDF时用到
|
|
|
+ // API_URL: 'http://10.76.248.23:10091/api/' //服务器渲染时调用
|
|
|
+
|
|
|
+ /* --------Nuxt Start发版用 END-------------- */
|
|
|
+ },
|
|
|
+}
|