vue.config.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. module.exports = {
  2. parallel: false,
  3. productionSourceMap: false,
  4. outputDir: 'page_docs',
  5. publicPath: process.env.VUE_APP_BASE_PUBLIC,
  6. lintOnSave: true,
  7. devServer: {
  8. port: '8080',
  9. disableHostCheck: true,
  10. proxy: {
  11. '^/jydocs': {
  12. target: 'http://web2-jytest.jydev.jianyu360.com',
  13. // target: 'http://192.168.20.180:821',
  14. changeOrigin: true,
  15. logLevel: 'debug',
  16. pathRewrite: {
  17. '^/jydocs': '/jydocs'
  18. }
  19. },
  20. '^/jyintegral': {
  21. target: 'http://web2-jytest.jydev.jianyu360.com',
  22. // target: 'http://192.168.20.145:820',
  23. changeOrigin: true,
  24. logLevel: 'debug',
  25. pathRewrite: {
  26. '^/jyintegral': '/jyintegral'
  27. }
  28. }
  29. }
  30. },
  31. css: {
  32. loaderOptions: {
  33. sass: {
  34. prependData: '@import "@/assets/style/_mixin.scss";@import "@/assets/style/_variables.scss";'
  35. }
  36. }
  37. },
  38. chainWebpack: config => {
  39. if (!process.env.VUE_APP_ALONE) {
  40. config.devServer.set('inline', false)
  41. config.devServer.set('hot', true)
  42. if (process.env.NODE_ENV !== 'production') {
  43. config.output.filename('js/[name].js')
  44. }
  45. config.externals(['vue', 'vue-router'])
  46. }
  47. },
  48. filenameHashing: false
  49. }