webpack.config.js 693 B

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