webpack.common.js 531 B

12345678910111213141516171819202122232425262728
  1. const path = require('path');
  2. const { VueLoaderPlugin } = require('vue-loader');
  3. module.exports = {
  4. entry: path.join(__dirname, 'src', 'init.js'),
  5. output: {
  6. path: path.resolve(__dirname, './js'),
  7. publicPath: '/js/',
  8. filename: 'updatenotification.js'
  9. },
  10. module: {
  11. rules: [
  12. {
  13. test: /\.vue$/,
  14. loader: 'vue-loader'
  15. },
  16. {
  17. test: /\.js$/,
  18. loader: 'babel-loader',
  19. exclude: /node_modules/
  20. }
  21. ]
  22. },
  23. plugins: [new VueLoaderPlugin()],
  24. resolve: {
  25. extensions: ['*', '.js', '.vue', '.json']
  26. }
  27. };