webpack.config.dev.js 1016 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. 'use strict'
  2. const webpack = require('webpack')
  3. const merge = require('webpack-merge')
  4. const baseConfig = require('./webpack.config.base')
  5. const PORT = 8988
  6. module.exports = merge(baseConfig, {
  7. mode: 'development',
  8. devServer: {
  9. clientLogLevel: 'warning',
  10. historyApiFallback: {
  11. rewrites: [
  12. { from: /.*/, to: '/index.html' },
  13. ],
  14. },
  15. hot: true,
  16. contentBase: 'dist',
  17. compress: true,
  18. // host: 'dev.gdp.fr',
  19. host: '0.0.0.0',
  20. port: PORT,
  21. disableHostCheck: true,
  22. // open: "firefox-developer-edition",
  23. overlay: { warnings: false, errors: true },
  24. publicPath: '/',
  25. quiet: true,
  26. },
  27. module: {
  28. rules: [
  29. {
  30. test: /\.css$/,
  31. use: [
  32. 'vue-style-loader',
  33. 'css-loader'
  34. ]
  35. }, {
  36. test: /\.scss$/,
  37. use: [
  38. 'vue-style-loader',
  39. 'css-loader',
  40. 'sass-loader'
  41. ]
  42. }
  43. ]
  44. },
  45. plugins: [
  46. new webpack.HotModuleReplacementPlugin()
  47. ]
  48. })