File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33/** @type {import("@rspack/core").Configuration } */
44export default {
55 entry : {
6- main : " ./src/index.ts" ,
6+ main : ' ./src/index.ts' ,
77 } ,
8- experiments : {
9- inlineEnum : true ,
10- } ,
11- mode : "production" ,
8+ mode : 'production' ,
129 optimization : {
10+ // This is the feature that enables inlining, it's enabled by default in production mode
11+ inlineExports : true ,
1312 // disable minimize so you can understand the output
1413 minimize : false ,
1514 } ,
1615 resolve : {
17- extensions : [ " .ts" , " ..." ] ,
16+ extensions : [ ' .ts' , ' ...' ] ,
1817 } ,
1918 module : {
2019 rules : [
2120 {
2221 test : / \. t s $ / ,
2322 use : {
24- loader : " builtin:swc-loader" ,
23+ loader : ' builtin:swc-loader' ,
2524 /** @type {import("@rspack/core").SwcLoaderOptions } */
2625 options : {
2726 jsc : {
2827 parser : {
29- syntax : " typescript" ,
28+ syntax : ' typescript' ,
3029 } ,
3130 transform : {
3231 tsEnumIsMutable : true ,
33- }
32+ } ,
3433 } ,
3534 rspackExperiments : {
3635 collectTypeScriptInfo : {
3736 exportedEnum : 'const-only' ,
38- }
39- }
37+ } ,
38+ } ,
4039 } ,
4140 } ,
42- type : " javascript/auto" ,
41+ type : ' javascript/auto' ,
4342 } ,
4443 ] ,
4544 } ,
Original file line number Diff line number Diff line change 11// @ts -check
2- import { rspack } from " @rspack/core" ;
2+ import { rspack } from ' @rspack/core' ;
33
44/** @type {import("@rspack/core").Configuration } */
55export default {
66 entry : {
7- main : " ./src/index.ts" ,
7+ main : ' ./src/index.ts' ,
88 } ,
9- experiments : {
10- inlineConst : true ,
11- } ,
12- mode : "production" ,
9+ mode : 'production' ,
1310 optimization : {
11+ // This is the feature that enables inlining, it's enabled by default in production mode
12+ inlineExports : true ,
1413 // disable minimize so you can understand the output
1514 minimize : false ,
1615 } ,
1716 resolve : {
18- extensions : [ " .ts" , " ..." ] ,
17+ extensions : [ ' .ts' , ' ...' ] ,
1918 } ,
2019 plugins : [
2120 new rspack . DefinePlugin ( {
22- ENV : JSON . stringify ( " mobile" ) ,
21+ ENV : JSON . stringify ( ' mobile' ) ,
2322 } ) ,
2423 ] ,
2524 module : {
2625 rules : [
2726 {
2827 test : / \. t s $ / ,
2928 use : {
30- loader : " builtin:swc-loader" ,
29+ loader : ' builtin:swc-loader' ,
3130 /** @type {import("@rspack/core").SwcLoaderOptions } */
3231 options : {
3332 jsc : {
3433 parser : {
35- syntax : " typescript" ,
34+ syntax : ' typescript' ,
3635 } ,
37- target : " es2015" , // use target es2015 or greater so swc won't transform const to var
36+ target : ' es2015' , // use target es2015 or greater so swc won't transform const to var
3837 } ,
3938 } ,
4039 } ,
41- type : " javascript/auto" ,
40+ type : ' javascript/auto' ,
4241 } ,
4342 ] ,
4443 } ,
Original file line number Diff line number Diff line change 33/** @type {import("@rspack/core").Configuration } */
44export default {
55 entry : {
6- main : " ./src/index.ts" ,
6+ main : ' ./src/index.ts' ,
77 } ,
8- experiments : {
9- inlineEnum : true ,
10- } ,
11- mode : "production" ,
8+ mode : 'production' ,
129 optimization : {
10+ // This is the feature that enables inlining, it's enabled by default in production mode
11+ inlineExports : true ,
1312 // disable minimize so you can understand the output
1413 minimize : false ,
1514 } ,
1615 resolve : {
17- extensions : [ " .ts" , " ..." ] ,
16+ extensions : [ ' .ts' , ' ...' ] ,
1817 } ,
1918 module : {
2019 rules : [
2120 {
2221 test : / \. t s $ / ,
2322 use : {
24- loader : " builtin:swc-loader" ,
23+ loader : ' builtin:swc-loader' ,
2524 /** @type {import("@rspack/core").SwcLoaderOptions } */
2625 options : {
2726 jsc : {
2827 parser : {
29- syntax : " typescript" ,
30- }
28+ syntax : ' typescript' ,
29+ } ,
3130 } ,
3231 rspackExperiments : {
3332 collectTypeScriptInfo : {
3433 exportedEnum : true ,
35- }
36- }
34+ } ,
35+ } ,
3736 } ,
3837 } ,
39- type : " javascript/auto" ,
38+ type : ' javascript/auto' ,
4039 } ,
4140 ] ,
4241 } ,
Original file line number Diff line number Diff line change 33/** @type {import("@rspack/core").Configuration } */
44export default {
55 entry : {
6- main : " ./src/index.ts" ,
6+ main : ' ./src/index.ts' ,
77 } ,
8- experiments : {
9- typeReexportsPresence : true ,
10- } ,
11- mode : "production" ,
8+ mode : 'production' ,
129 optimization : {
1310 // disable minimize so you can understand the output
1411 minimize : false ,
1512 } ,
1613 resolve : {
17- extensions : [ " .ts" , " ..." ] ,
14+ extensions : [ ' .ts' , ' ...' ] ,
1815 } ,
1916 module : {
2017 parser : {
2118 javascript : {
22- typeReexportsPresence : " tolerant" ,
23- }
19+ typeReexportsPresence : ' tolerant' ,
20+ } ,
2421 } ,
2522 rules : [
2623 {
2724 test : / \. t s $ / ,
2825 use : {
29- loader : " builtin:swc-loader" ,
26+ loader : ' builtin:swc-loader' ,
3027 /** @type {import("@rspack/core").SwcLoaderOptions } */
3128 options : {
3229 jsc : {
3330 parser : {
34- syntax : " typescript" ,
35- }
31+ syntax : ' typescript' ,
32+ } ,
3633 } ,
3734 rspackExperiments : {
3835 collectTypeScriptInfo : {
3936 typeExports : true ,
40- }
41- }
37+ } ,
38+ } ,
4239 } ,
4340 } ,
44- type : " javascript/auto" ,
41+ type : ' javascript/auto' ,
4542 } ,
4643 ] ,
4744 } ,
You can’t perform that action at this time.
0 commit comments