diff --git a/webpack.config.js b/webpack.config.js index 5c35171..c8fe99c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const webpack = require('webpack'); module.exports = { mode: process.env.NODE_ENV ? process.env.NODE_ENV : 'development', @@ -24,8 +25,11 @@ module.exports = { }, ], }, - plugins: [new HtmlWebpackPlugin({ template: 'public/index.html' })], - resolve: { fallback: { child_process: false, constants: false, fs: false, tty: false } }, + plugins: [ + new HtmlWebpackPlugin({ template: 'public/index.html' }), + new webpack.IgnorePlugin({ resourceRegExp: /^node:/ }), + ], + resolve: { fallback: { child_process: false, constants: false, fs: false, tty: false, 'node:constants': false, 'node:child_process': false, 'node:fs': false, 'node:tty': false } }, devServer: { contentBase: path.resolve(__dirname, 'public'), },