Skip to content

Commit

Permalink
feat(esm): support type=module for script tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilnayyar002 committed Oct 29, 2021
1 parent 6691cbb commit 36d1851
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ module.exports = {
new HtmlWebpackPlugin({
template: path.resolve(__dirname, wmConfig.publicDir, wmConfig.publicDirHtmlFileName),
filename: path.resolve(__dirname, wmConfig.outputDir, wmConfig.outputDirHtmlFileName),
inject: 'body' // inject bundle's inside body tag at the end
inject: 'body', // inject bundle's inside body tag at the end
scriptLoading: wmConfig.webpack.outputESModule ? "module" : "defer"
}),
new InterpolateHtmlPlugin(wmConfig.specialEnvVariables),
new CircularDependencyPlugin({
Expand Down

0 comments on commit 36d1851

Please sign in to comment.