webpack.common.js 501 B

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