webpack.config.js 617 B

1234567891011121314151617181920212223242526272829
  1. // webpack.config.js
  2. module.exports = {
  3. // entry point of our application
  4. entry: './main.js',
  5. // where to place the compiled bundle
  6. output: {
  7. path: __dirname + '/build/',
  8. filename: 'build.js'
  9. },
  10. module: {
  11. // `loaders` is an array of loaders to use.
  12. // here we are only configuring vue-loader
  13. loaders: [
  14. {
  15. test: /\.vue$/, // a regex for matching all files that end in `.vue`
  16. loader: 'vue' // loader to use for matched files,
  17. },
  18. {
  19. test: /\.js$/,
  20. loader: 'babel',
  21. exclude: /node_modules/
  22. }
  23. ]
  24. },
  25. babel: {
  26. presets: ['es2015'],
  27. plugins: ['transform-runtime']
  28. }
  29. };