After Build Via Webpack 5 App Stoped Working On Internet Explorer (ie11)
Solution 1:
From the webpack guide To v5 from v4, it says:
By default, webpack's runtime code uses ES2015 syntax to build smaller bundles. If your build targets environments that don't support this syntax (like IE11), you'll need to set
target: ['web', 'es5']
to revert to ES5 syntax ('web'
if target environment is browser).
So you can try to set:
target: ['web', 'es5']
then it will convert code to ES5.
Solution 2:
You could manually configure the features available in the webpack runtime with output.environment
.
However, by default webpack 5 will honor any browserslist
entries it finds and set the runtime to only use those features available in your target browsers. You can configure which browsers to target using any of the methods here, but the easiest way is to specify a key in your package.json
:
"browserslist":"ie 11"
Post a Comment for "After Build Via Webpack 5 App Stoped Working On Internet Explorer (ie11)"