index.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // see http://vuejs-templates.github.io/webpack for documentation.
  2. var path = require('path')
  3. module.exports = {
  4. build: {
  5. env: {
  6. NODE_ENV: '"production"'
  7. },
  8. index: path.resolve(__dirname, '../elm/index.html'),
  9. assetsRoot: path.resolve(__dirname, '../elm'),
  10. assetsSubDirectory: 'static',
  11. assetsPublicPath: '/',//mobile/
  12. productionSourceMap: true,
  13. // Surge or Netlify already gzip all static assets for you.
  14. // Before setting to `true`, make sure to:
  15. // npm install --save-dev compression-webpack-plugin
  16. productionGzip: false,
  17. productionGzipExtensions: ['js', 'css']
  18. },
  19. dev: {
  20. env: {
  21. NODE_ENV: '"development"'
  22. },
  23. port: 8000,
  24. assetsSubDirectory: 'static',
  25. assetsPublicPath: '/',
  26. context: [ //代理路径
  27. '/shopping',
  28. '/ugc',
  29. '/v1',
  30. '/v2',
  31. '/v3',
  32. '/v4',
  33. '/bos',
  34. '/member',
  35. '/promotion',
  36. '/eus',
  37. '/payapi',
  38. '/img',
  39. '/file',
  40. '/position'
  41. ],
  42. proxypath: 'http://localhost:8082',
  43. // CSS Sourcemaps off by default because relative paths are "buggy"
  44. // with this option, according to the CSS-Loader README
  45. // (https://github.com/webpack/css-loader#sourcemaps)
  46. // In our experience, they generally work as expected,
  47. // just be aware of this issue when enabling this option.
  48. cssSourceMap: false
  49. }
  50. }