1234567891011121314151617181920212223242526 |
- const webpack = require('webpack');
- module.exports = {
- mode: 'development',
- devtool: 'inline-source-map',
- devServer: {
- port: 3000,
- hot: true,
- historyApiFallback: {
- disableDotRule: true
- },
- open: true,
- disableHostCheck: true,
- proxy: {
- '/api/': {
- target: 'https://jsonplaceholder.typicode.com/',
- changeOrigin: true,
- },
- }
- },
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': JSON.stringify(process.env)
- })
- ],
- };
|