webpack.common.js 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. const path = require('path')
  2. const { VueLoaderPlugin } = require('vue-loader');
  3. module.exports = {
  4. entry: {
  5. 'settings-vue': './src/main.js',
  6. 'settings-admin-security': './src/main-admin-security'
  7. },
  8. output: {
  9. path: path.resolve(__dirname, './js'),
  10. publicPath: '/',
  11. filename: '[name].js'
  12. },
  13. module: {
  14. rules: [
  15. {
  16. test: /\.css$/,
  17. use: [
  18. 'vue-style-loader', 'css-loader'
  19. ],
  20. },
  21. {
  22. test: /\.scss$/,
  23. use: [
  24. 'vue-style-loader', 'css-loader', 'sass-loader'
  25. ],
  26. },
  27. {
  28. test: /\.vue$/,
  29. loader: 'vue-loader',
  30. },
  31. {
  32. test: /\.js$/,
  33. loader: 'babel-loader',
  34. exclude: /node_modules/
  35. },
  36. ]
  37. },
  38. plugins: [
  39. new VueLoaderPlugin()
  40. ],
  41. resolve: {
  42. extensions: ['*', '.js', '.vue', '.json']
  43. }
  44. }