-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Description
Bug report
What is the current behavior?
Using the following config works in Webpack 4 but not Webpack 5:
module.exports = {
output: {
library: "A",
},
optimization: {
runtimeChunk: "single"
},
};I would expect the module to be assigned to a variable A, but in Webpack 5 A is undefined.
Webpack 4 output:
var A =
(window["webpackJsonpA"] = window["webpackJsonpA"] || []).push([["main"],{
...
},[["./src/index.js","runtime"]]]);Webpack 5 output:
var A;
(self["webpackChunkA"] = self["webpackChunkA"] || []).push([["main"],{
...
},
0,[["./src/index.js","runtime"]]]);If the current behavior is a bug, please provide the steps to reproduce.
Smallest reproducible bug demo: https://github.com/keeganstreet/webpack-5-library
What is the expected behavior?
The module should be assigned to A.
Other relevant information:
webpack version: 5.24.2
Node.js version: v14.4.0
Operating System: Mac OS
Additional tools: N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels