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 } ], 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: { // baseURL: '//localhost:10091/api/' // 本机开发使用 // baseURL: '//47.92.212.59:10091/api/' // Lims使用 // baseURL: '//api09.labsop.cn/api/' // baseURL: '//52.80.133.197:10091/api/' // DQM 爱萨尔发布使用 // baseURL: '//192.168.0.211:10091/api/' // 花生所系统 // baseURL: '//121.42.244.202:9081/api/' // 基石发布使用 baseURL: '//52.80.133.197:9081/api/' // BioBank on AWS发布使用 // baseURL: '//52.80.133.197:10092/api/' // 因顿LIMS发布 // baseURL: '//188.188.30.89:9081/api/' //临沂使用 // proxyHeaders: false }, /* ** 客户端和服务端共享的环境变量, ** 客户端使用:process.env.appclient 服务端使用:context.appclient */ env: { appclient: 'biobank', //因顿LIMS:lims,样本库:biobank,细胞制备:cellbank,样本搜索判断,登录跳转判断 // imgserverhost: 'http://52.80.133.197:10091', // 服务地址,图片上传文件 imgserverhost: 'http://52.80.133.197:9081', // BioBank服务地址,图片上传文件 upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传 // imgserverhost: 'http://192.168.0.211:10091', // 花生所系统服务地址,图片上传文件 // upfilehost: 'http://192.168.0.211:9333/dir/assign' // 花生所系统附件上传 //imgserverhost: 'http://188.188.30.89:9081', // 临沂服务地址,图片上传文件 //upfilehost: '188.188.30.89:9333/dir/assign', // 临沂附件上传 //limsimgserverhost:' http://47.92.212.59:10091',//lims图片上传 //onlyofficeUrl: 'http://192.168.0.252:9221', //onlyoffice地址 //onlyofficeCallBackUrl: 'http://192.168.0.108:10091', //onlyofficeCallBack的本地地址 //onlyofficeUrl: 'http://47.92.212.59:9221', //onlyoffice地址 Lims //onlyofficeCallBackUrl: 'http://47.92.212.59:10091' //onlyofficeCallBack地址 Lims baseURL: '//localhost:10091/api/' // 本机开发使用 } }