webpack.config.js 593 B

123456789101112131415161718192021222324252627282930313233343536
  1. const webpack = require('webpack');
  2. module.exports = {
  3. devtool: 'eval-source-map',
  4. entry: './main.js',
  5. output: {
  6. path: __dirname + '/build/',
  7. publicPath: '/',
  8. filename: 'bundle.js'
  9. },
  10. module: {
  11. loaders: [
  12. {
  13. enforce: 'pre',
  14. test: /\.vue$/,
  15. loader: 'vue-loader',
  16. exclude: /node_modules/
  17. },
  18. {
  19. test: /\.js$/,
  20. loader: 'babel-loader',
  21. exclude: /node_modules/
  22. },
  23. {
  24. test: /\.scss$/,
  25. exclude: /node_modules/,
  26. loader: 'css-loader!sass-loader'
  27. }
  28. ]
  29. },
  30. vue: {
  31. loaders: {
  32. scss: 'style-loader!css-loader!sass-loader'
  33. }
  34. }
  35. };