12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- const pkg = require('./package.json')
- const path = require('path')
- const localIP = require('ip').address()
- const isPord = process.env.NODE_ENV !== 'development'
- const isDev = process.env.NODE_ENV === 'development'
- if (isDev) {
- process.env.VUE_APP_VERSION = pkg.version + '-' + Date.now()
- } else {
- process.env.VUE_APP_VERSION = pkg.version
- }
- const devServer = {
- disableHostCheck: true,
- headers: {
- 'Cache-Control': 'no-store'
- },
- proxy: {
- '/service': {
- target: 'https://test.4dkankan.com/',
- changeOrigin: true
- },
- '/smart-site': {
- target: 'https://test.4dkankan.com/',
- changeOrigin: true
- }
- }
- }
- const config = {
- assetsDir: 'static',
- publicPath: '',
- outputDir: 'dist',//isDev ? 'dist' : path.resolve('../../dist/siter'),
- productionSourceMap: isDev,
- pages: {
- 'smart-bim': 'src/pages/bim.js',
- 'smart-kankan': 'src/pages/kankan.js',
- 'smart-laser': 'src/pages/laser.js',
- 'smart-viewer': 'src/pages/viewer.js',
- 'smart-sviewer': 'src/pages/sviewer.js',
- },
- css: {
- extract: false,
- loaderOptions: {
- scss: {}
- }
- },
- devServer: devServer,
- configureWebpack: {
- resolve: {
- symlinks: false,
- alias: {
- vue: path.resolve(`node_modules/vue`)
- }
- }
- }
- }
- module.exports = config
|