@@ -63,6 +63,8 @@ const test9 = require('../../src/cjs.js?type=commonjs&exports=single%20Foo!./sim
6363const test10 = require('../../src/cjs.js?type=commonjs& exports=multiple%20Foo!./simple.js');
6464const test11 = require('../../src/cjs.js?type=module& exports=named%20Foo%20FooA!./simple.js');
6565const test12 = require('../../src/cjs.js?type=module& exports[]=named|Foo%20FooA& exports[]=named%20Bar%20BarA!./simple.js');
66+ const test13 = require('../../src/cjs.js?type=module& exports[]=named|Foo|FooA& exports[]=named|Bar|BarA!./simple.js');
67+ const test14 = require('../../src/cjs.js?type=module& exports=default|Foo!./simple.js');
6668
6769module.exports = {
6870 test1 ,
@@ -76,7 +78,9 @@ module.exports = {
7678 test9 ,
7779 test10 ,
7880 test11 ,
79- test12
81+ test12 ,
82+ test13 ,
83+ test14
8084} ;
8185"
8286` ;
@@ -111,6 +115,24 @@ Object {
111115 " Image" : [Function ],
112116 },
113117 },
118+ " test13" : Object {
119+ " BarA" : Object {
120+ " test" : Array [
121+ 1 ,
122+ 2 ,
123+ 3 ,
124+ 4 ,
125+ ],
126+ },
127+ " FooA" : Object {
128+ " Image" : [Function ],
129+ },
130+ },
131+ " test14" : Object {
132+ " default" : Object {
133+ " Image" : [Function ],
134+ },
135+ },
114136 " test2" : Object {
115137 " Bar" : Object {
116138 " test" : Array [
@@ -992,6 +1014,145 @@ Object {
9921014
9931015exports [` loader should work with the "commonjs" module format for "multiple Foo" export list: warnings 1` ] = ` Array []` ;
9941016
1017+ exports [` loader should work with the "commonjs" module format for "multiple|[name] [name]A" export list: errors 1` ] = ` Array []` ;
1018+
1019+ exports [` loader should work with the "commonjs" module format for "multiple|[name] [name]A" export list: module 1` ] = `
1020+ "var Foo = Foo || { } ;
1021+ var Bar = Bar || { } ;
1022+ var Baz = {
1023+ nestedNumber : ' 12' ,
1024+ nestedFunction : function test() {}
1025+ } ;
1026+ var simple = function simple() { } ;
1027+ var simple_foo = [1, 2, 3, 4, 5];
1028+
1029+ Foo.Image = function(width, height, data){
1030+ this .width = width || 0 ;
1031+ this .height = height || 0 ;
1032+ this .data = data || [];
1033+ } ;
1034+
1035+ Bar.test = [1, 2, 3, 4];
1036+
1037+ class MyClass {
1038+ myFunction () {
1039+ return 12;
1040+ }
1041+ }
1042+
1043+ const single = 'single';
1044+
1045+ const myVariable = new MyClass();
1046+
1047+ /*** EXPORTS FROM exports-loader ***/
1048+ module.exports = {
1049+ \\" simpleA\\ " : (simple )
1050+ } ;
1051+ "
1052+ ` ;
1053+
1054+ exports [` loader should work with the "commonjs" module format for "multiple|[name] [name]A" export list: result 1` ] = `
1055+ Object {
1056+ " simpleA" : [Function ],
1057+ }
1058+ ` ;
1059+
1060+ exports [` loader should work with the "commonjs" module format for "multiple|[name] [name]A" export list: warnings 1` ] = ` Array []` ;
1061+
1062+ exports [` loader should work with the "commonjs" module format for "multiple|Foo" export list: errors 1` ] = ` Array []` ;
1063+
1064+ exports [` loader should work with the "commonjs" module format for "multiple|Foo" export list: module 1` ] = `
1065+ "var Foo = Foo || { } ;
1066+ var Bar = Bar || { } ;
1067+ var Baz = {
1068+ nestedNumber : ' 12' ,
1069+ nestedFunction : function test() {}
1070+ } ;
1071+ var simple = function simple() { } ;
1072+ var simple_foo = [1, 2, 3, 4, 5];
1073+
1074+ Foo.Image = function(width, height, data){
1075+ this .width = width || 0 ;
1076+ this .height = height || 0 ;
1077+ this .data = data || [];
1078+ } ;
1079+
1080+ Bar.test = [1, 2, 3, 4];
1081+
1082+ class MyClass {
1083+ myFunction () {
1084+ return 12;
1085+ }
1086+ }
1087+
1088+ const single = 'single';
1089+
1090+ const myVariable = new MyClass();
1091+
1092+ /*** EXPORTS FROM exports-loader ***/
1093+ module.exports = {
1094+ Foo
1095+ } ;
1096+ "
1097+ ` ;
1098+
1099+ exports [` loader should work with the "commonjs" module format for "multiple|Foo" export list: result 1` ] = `
1100+ Object {
1101+ " Foo" : Object {
1102+ " Image" : [Function ],
1103+ },
1104+ }
1105+ ` ;
1106+
1107+ exports [` loader should work with the "commonjs" module format for "multiple|Foo" export list: warnings 1` ] = ` Array []` ;
1108+
1109+ exports [` loader should work with the "commonjs" module format for "multiple|Foo|FooA" export list: errors 1` ] = ` Array []` ;
1110+
1111+ exports [` loader should work with the "commonjs" module format for "multiple|Foo|FooA" export list: module 1` ] = `
1112+ "var Foo = Foo || { } ;
1113+ var Bar = Bar || { } ;
1114+ var Baz = {
1115+ nestedNumber : ' 12' ,
1116+ nestedFunction : function test() {}
1117+ } ;
1118+ var simple = function simple() { } ;
1119+ var simple_foo = [1, 2, 3, 4, 5];
1120+
1121+ Foo.Image = function(width, height, data){
1122+ this .width = width || 0 ;
1123+ this .height = height || 0 ;
1124+ this .data = data || [];
1125+ } ;
1126+
1127+ Bar.test = [1, 2, 3, 4];
1128+
1129+ class MyClass {
1130+ myFunction () {
1131+ return 12;
1132+ }
1133+ }
1134+
1135+ const single = 'single';
1136+
1137+ const myVariable = new MyClass();
1138+
1139+ /*** EXPORTS FROM exports-loader ***/
1140+ module.exports = {
1141+ \\" FooA\\ " : (Foo )
1142+ } ;
1143+ "
1144+ ` ;
1145+
1146+ exports [` loader should work with the "commonjs" module format for "multiple|Foo|FooA" export list: result 1` ] = `
1147+ Object {
1148+ " FooA" : Object {
1149+ " Image" : [Function ],
1150+ },
1151+ }
1152+ ` ;
1153+
1154+ exports [` loader should work with the "commonjs" module format for "multiple|Foo|FooA" export list: warnings 1` ] = ` Array []` ;
1155+
9951156exports [` loader should work with the "commonjs" module format for "named Foo" export list: errors 1` ] = `
9961157Array [
9971158 "ModuleBuildError: Module build failed (from \` replaced original path\` ):
@@ -2052,6 +2213,100 @@ Object {
20522213
20532214exports [` loader should work with the "module" module format for "named|[name] [name]A" export list: warnings 1` ] = ` Array []` ;
20542215
2216+ exports [` loader should work with the "module" module format for "named|Foo" export list: errors 1` ] = ` Array []` ;
2217+
2218+ exports [` loader should work with the "module" module format for "named|Foo" export list: module 1` ] = `
2219+ "var Foo = Foo || { } ;
2220+ var Bar = Bar || { } ;
2221+ var Baz = {
2222+ nestedNumber : ' 12' ,
2223+ nestedFunction : function test() {}
2224+ } ;
2225+ var simple = function simple() { } ;
2226+ var simple_foo = [1, 2, 3, 4, 5];
2227+
2228+ Foo.Image = function(width, height, data){
2229+ this .width = width || 0 ;
2230+ this .height = height || 0 ;
2231+ this .data = data || [];
2232+ } ;
2233+
2234+ Bar.test = [1, 2, 3, 4];
2235+
2236+ class MyClass {
2237+ myFunction () {
2238+ return 12;
2239+ }
2240+ }
2241+
2242+ const single = 'single';
2243+
2244+ const myVariable = new MyClass();
2245+
2246+ /*** EXPORTS FROM exports-loader ***/
2247+ export {
2248+ Foo
2249+ } ;
2250+ "
2251+ ` ;
2252+
2253+ exports [` loader should work with the "module" module format for "named|Foo" export list: result 1` ] = `
2254+ Object {
2255+ " Foo" : Object {
2256+ " Image" : [Function ],
2257+ },
2258+ }
2259+ ` ;
2260+
2261+ exports [` loader should work with the "module" module format for "named|Foo" export list: warnings 1` ] = ` Array []` ;
2262+
2263+ exports [` loader should work with the "module" module format for "named|Foo|FooA" export list: errors 1` ] = ` Array []` ;
2264+
2265+ exports [` loader should work with the "module" module format for "named|Foo|FooA" export list: module 1` ] = `
2266+ "var Foo = Foo || { } ;
2267+ var Bar = Bar || { } ;
2268+ var Baz = {
2269+ nestedNumber : ' 12' ,
2270+ nestedFunction : function test() {}
2271+ } ;
2272+ var simple = function simple() { } ;
2273+ var simple_foo = [1, 2, 3, 4, 5];
2274+
2275+ Foo.Image = function(width, height, data){
2276+ this .width = width || 0 ;
2277+ this .height = height || 0 ;
2278+ this .data = data || [];
2279+ } ;
2280+
2281+ Bar.test = [1, 2, 3, 4];
2282+
2283+ class MyClass {
2284+ myFunction () {
2285+ return 12;
2286+ }
2287+ }
2288+
2289+ const single = 'single';
2290+
2291+ const myVariable = new MyClass();
2292+
2293+ /*** EXPORTS FROM exports-loader ***/
2294+ export {
2295+ Foo as FooA
2296+ } ;
2297+ "
2298+ ` ;
2299+
2300+ exports [` loader should work with the "module" module format for "named|Foo|FooA" export list: result 1` ] = `
2301+ Object {
2302+ " FooA" : Object {
2303+ " Image" : [Function ],
2304+ },
2305+ }
2306+ ` ;
2307+
2308+ exports [` loader should work with the "module" module format for "named|Foo|FooA" export list: warnings 1` ] = ` Array []` ;
2309+
20552310exports [` loader should work with the "module" module format for "single Foo" export list: errors 1` ] = `
20562311Array [
20572312 "ModuleBuildError: Module build failed (from \` replaced original path\` ):
0 commit comments