FIX: webpack config NodePolyfillPlugin

This commit is contained in:
kharhamel 2021-05-17 16:30:19 +02:00
parent a66d42e158
commit f2dca82642
3 changed files with 639 additions and 12 deletions

View file

@ -5,6 +5,7 @@ const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
const mode = process.env.NODE_ENV ?? 'development';
const isProduction = mode === 'production';
@ -77,6 +78,7 @@ module.exports = {
new webpack.ProvidePlugin({
Phaser: 'phaser'
}),
new NodePolyfillPlugin(),
new webpack.EnvironmentPlugin({
'API_URL': null,
'SKIP_RENDER_OPTIMIZATIONS': false,