webpack.config.js 890 B

1234567891011121314151617181920212223242526272829303132
  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: 'bundle.js'
  9. },
  10. module: {
  11. // `loaders` is an array of loaders to use.
  12. loaders: [
  13. {
  14. test: /\.vue$/, // a regex for matching all files that end in `.vue`
  15. loader: 'vue' // loader to use for matched files,
  16. },
  17. {
  18. test: /\.js$/, // a regex for matching all files that end in `.js`
  19. loader: 'babel', // loader to use for matched files,
  20. exclude: /node_modules/ // excludes the folder `node_modules`
  21. },
  22. {
  23. test: /\.scss$/, // a regex for matching all files that end in `.scss`
  24. loader: "css-loader!sass-loader" // loader to use for matched files,
  25. }
  26. ]
  27. },
  28. babel: {
  29. presets: ['es2015'],
  30. plugins: ['transform-runtime']
  31. }
  32. };