index.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // see http://vuejs-templates.github.io/webpack for documentation.
  2. var path = require('path')
  3. module.exports = {
  4. build: {
  5. env: require('./prod.env'),
  6. index: path.resolve(__dirname, '../dist/index.html'),
  7. assetsRoot: path.resolve(__dirname, '../dist'),
  8. assetsSubDirectory: 'static',
  9. assetsPublicPath: '/',
  10. productionSourceMap: true,
  11. // Gzip off by default as many popular static hosts such as
  12. // Surge or Netlify already gzip all static assets for you.
  13. // Before setting to `true`, make sure to:
  14. // npm install --save-dev compression-webpack-plugin
  15. productionGzip: false,
  16. productionGzipExtensions: ['js', 'css']
  17. },
  18. dev: {
  19. env: require('./dev.env'),
  20. port: 8080,
  21. assetsSubDirectory: 'static',
  22. assetsPublicPath: '/',
  23. proxyTable: {
  24. '/days': 'http://localhost:3000',
  25. '/attendees': 'http://localhost:3000',
  26. '/login': 'http://localhost:3000',
  27. '/logout': 'http://localhost:3000',
  28. '/user': 'http://localhost:3000',
  29. '/groups': 'http://localhost:3000',
  30. '/settings': 'http://localhost:3000'
  31. },
  32. // CSS Sourcemaps off by default because relative paths are "buggy"
  33. // with this option, according to the CSS-Loader README
  34. // (https://github.com/webpack/css-loader#sourcemaps)
  35. // In our experience, they generally work as expected,
  36. // just be aware of this issue when enabling this option.
  37. cssSourceMap: false
  38. }
  39. }