Skip to content

Commit f3538d0

Browse files
authored
Fix failing main (#903)
1 parent eafd20d commit f3538d0

File tree

3 files changed

+165
-182
lines changed

3 files changed

+165
-182
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"react-intl-webpack-plugin": "^0.3.0",
4545
"rimraf": "^3.0.0",
4646
"semver": "7.3.2",
47-
"webpack": "^5.4.0"
47+
"webpack": "^5.34.0"
4848
},
4949
"scripts": {
5050
"clean": "rimraf lib/",

test/sourcemaps.test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ test.cb("should output webpack's sourcemap properly when set 'inline'", t => {
117117

118118
if (isWebpack5) {
119119
t.is(
120-
mapObj.sources[0],
120+
mapObj.sources[3],
121121
"webpack://babel-loader/./test/fixtures/basic.js",
122122
);
123123

124124
// Ensure that the map contains the original code, not the compiled src.
125-
t.falsy(mapObj.sourcesContent[2].includes("__esModule"));
125+
t.falsy(mapObj.sourcesContent[3].includes("__esModule"));
126126
} else {
127127
t.is(mapObj.sources[1], "webpack:///./test/fixtures/basic.js");
128128

@@ -232,13 +232,13 @@ test.cb("should disable sourcemap output with 'sourceMaps:false'", t => {
232232

233233
if (isWebpack5) {
234234
t.is(
235-
mapObj.sources[0],
235+
mapObj.sources[3],
236236
"webpack://babel-loader/./test/fixtures/basic.js",
237237
);
238238

239239
// Ensure that the code contains Babel's compiled output, because
240240
// sourcemaps from Babel are disabled.
241-
t.truthy(mapObj.sourcesContent[2].includes("__esModule"));
241+
t.truthy(mapObj.sourcesContent[3].includes("__esModule"));
242242
} else {
243243
t.is(mapObj.sources[1], "webpack:///./test/fixtures/basic.js");
244244

@@ -295,13 +295,13 @@ test.cb("should disable sourcemap output with 'sourceMap:false'", t => {
295295

296296
if (isWebpack5) {
297297
t.is(
298-
mapObj.sources[0],
298+
mapObj.sources[3],
299299
"webpack://babel-loader/./test/fixtures/basic.js",
300300
);
301301

302302
// Ensure that the code contains Babel's compiled output, because
303303
// sourcemaps from Babel are disabled.
304-
t.truthy(mapObj.sourcesContent[2].includes("__esModule"));
304+
t.truthy(mapObj.sourcesContent[3].includes("__esModule"));
305305
} else {
306306
t.is(mapObj.sources[1], "webpack:///./test/fixtures/basic.js");
307307

0 commit comments

Comments
 (0)