index.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 'use strict'
  2. // Template version: 1.1.3
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4. const path = require('path')
  5. module.exports = {
  6. build: {
  7. env: require('./prod.env'),
  8. index: path.resolve(__dirname, '../example/index.html'),
  9. assetsRoot: path.resolve(__dirname, '../example'),
  10. assetsSubDirectory: './static',
  11. assetsPublicPath: './',
  12. productionSourceMap: true,
  13. // Gzip off by default as many popular static hosts such as
  14. // Surge or Netlify already gzip all static assets for you.
  15. // Before setting to `true`, make sure to:
  16. // npm install --save-dev compression-webpack-plugin
  17. productionGzip: false,
  18. productionGzipExtensions: ['js', 'css'],
  19. // Run the build command with an extra argument to
  20. // View the bundle analyzer report after build finishes:
  21. // `npm run build --report`
  22. // Set to `true` or `false` to always turn it on or off
  23. bundleAnalyzerReport: process.env.npm_config_report
  24. },
  25. dev: {
  26. env: require('./dev.env'),
  27. port: process.env.PORT || 8080,
  28. autoOpenBrowser: true,
  29. assetsSubDirectory: 'static',
  30. assetsPublicPath: '/',
  31. proxyTable: {},
  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. }