webpack.config.dev.js 883 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 'use strict'
  2. const webpack = require('webpack')
  3. const merge = require('webpack-merge')
  4. const baseConfig = require('./webpack.config.base')
  5. const HOST = 'localhost'
  6. const PORT = 8080
  7. module.exports = merge(baseConfig, {
  8. mode: 'development',
  9. devServer: {
  10. clientLogLevel: 'warning',
  11. hot: true,
  12. contentBase: 'dist',
  13. compress: true,
  14. host: HOST,
  15. port: PORT,
  16. // open: "firefox-developer-edition",
  17. overlay: { warnings: false, errors: true },
  18. publicPath: '/',
  19. quiet: true
  20. },
  21. module: {
  22. rules: [
  23. {
  24. test: /\.css$/,
  25. use: [
  26. 'vue-style-loader',
  27. 'css-loader'
  28. ]
  29. }, {
  30. test: /\.styl(us)?$/,
  31. use: [
  32. 'vue-style-loader',
  33. 'css-loader',
  34. 'stylus-loader'
  35. ]
  36. }
  37. ]
  38. },
  39. plugins: [
  40. new webpack.HotModuleReplacementPlugin()
  41. ]
  42. })