You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1.4 KiB

  1. var webpack = require('webpack');
  2. module.exports = {
  3. context: __dirname + "/app",
  4. entry: "./main.js",
  5. output: {
  6. path: __dirname + "/dist",
  7. publicPath: '/dist/',
  8. filename: "bundle.js"
  9. },
  10. module: {
  11. loaders: [
  12. //{test: /\.js$/, loader: 'babel-loader', query: {presets: ['es2015']}},
  13. {
  14. test: /\.js$/,
  15. exclude: /node_modules|vue\/dist|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
  16. loader: 'babel'
  17. },
  18. {test: /\.css$/, loader: 'style-loader!css-loader'},
  19. {test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'},
  20. {test: /\.vue$/, loader: 'vue'},
  21. { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"},
  22. { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"},
  23. { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream"},
  24. {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file"},
  25. { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml"}
  26. ]
  27. },
  28. plugins: [
  29. new webpack.ProvidePlugin({
  30. $: "jquery",
  31. jQuery: "jquery",
  32. "window.jQuery": "jquery"
  33. })
  34. ]
  35. };