webpack.config.js 664 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. const webpack = require('webpack');
  2. module.exports = {
  3. entry: './main.js',
  4. output: {
  5. path: __dirname + '/build/',
  6. filename: 'bundle.js'
  7. },
  8. module: {
  9. preLoaders: [
  10. {
  11. test: /\.vue$/,
  12. loader: 'eslint',
  13. exclude: /node_modules/
  14. }
  15. ],
  16. loaders: [
  17. {
  18. test: /\.vue$/,
  19. loader: 'vue'
  20. },
  21. {
  22. test: /\.js$/,
  23. loader: 'babel',
  24. exclude: /node_modules/
  25. },
  26. {
  27. test: /\.scss$/,
  28. loader: 'css-loader!sass-loader'
  29. }
  30. ]
  31. },
  32. vue: {
  33. loaders: {
  34. sass: 'style!css!sass?indentedSyntax',
  35. scss: 'style!css!sass'
  36. }
  37. },
  38. babel: {
  39. presets: ['es2015'],
  40. plugins: ['transform-runtime'],
  41. comments: false
  42. }
  43. };