webpack.config.dev.js 504 B

1234567891011121314151617181920212223242526
  1. const webpack = require('webpack');
  2. module.exports = {
  3. mode: 'development',
  4. devtool: 'inline-source-map',
  5. devServer: {
  6. port: 3000,
  7. hot: true,
  8. historyApiFallback: {
  9. disableDotRule: true
  10. },
  11. open: true,
  12. disableHostCheck: true,
  13. proxy: {
  14. '/api/': {
  15. target: 'https://jsonplaceholder.typicode.com/',
  16. changeOrigin: true,
  17. },
  18. }
  19. },
  20. plugins: [
  21. new webpack.DefinePlugin({
  22. 'process.env': JSON.stringify(process.env)
  23. })
  24. ],
  25. };