forked from rolldown/rolldown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
crates/rolldown/tests/rolldown/function/format/app/dynamic-import-chunk/_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"config": { | ||
"format": "app" | ||
}, | ||
"expectExecuted": false | ||
} |
40 changes: 40 additions & 0 deletions
40
crates/rolldown/tests/rolldown/function/format/app/dynamic-import-chunk/artifacts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
source: crates/rolldown_testing/src/integration_test.rs | ||
snapshot_kind: text | ||
--- | ||
# Assets | ||
|
||
## dep.js | ||
|
||
```js | ||
var __rolldown_modules = { | ||
"dep.js": function(__rolldown_runtime) { | ||
//#region dep.js | ||
__rolldown_runtime.__toCommonJS(__rolldown_runtime.exports); | ||
__rolldown_runtime.__export(__rolldown_runtime.exports, { default: () => dep_default }); | ||
var dep_default = "[dep ok]"; | ||
//#endregion | ||
}, | ||
}; | ||
``` | ||
## main.js | ||
|
||
```js | ||
var __rolldown_modules = { | ||
"main.js": function(__rolldown_runtime) { | ||
//#region main.js | ||
__rolldown_runtime.__toCommonJS(__rolldown_runtime.exports); | ||
__rolldown_runtime.__export(__rolldown_runtime.exports, { default: () => main_default }); | ||
var main_default = () => import("./dep.js"); | ||
//#endregion | ||
}, | ||
}; | ||
``` |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/rolldown/function/format/app/dynamic-import-chunk/dep.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default "[dep ok]" |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/rolldown/function/format/app/dynamic-import-chunk/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default () => import("./dep.js") |
16 changes: 16 additions & 0 deletions
16
crates/rolldown/tests/rolldown/function/format/app/shared-chunk/_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"config": { | ||
"format": "app", | ||
"input": [ | ||
{ | ||
"import": "./main1.js", | ||
"name": "main1" | ||
}, | ||
{ | ||
"import": "./main2.js", | ||
"name": "main2" | ||
} | ||
] | ||
}, | ||
"expectExecuted": false | ||
} |
59 changes: 59 additions & 0 deletions
59
crates/rolldown/tests/rolldown/function/format/app/shared-chunk/artifacts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
source: crates/rolldown_testing/src/integration_test.rs | ||
snapshot_kind: text | ||
--- | ||
# Assets | ||
|
||
## dep.js | ||
|
||
```js | ||
var __rolldown_modules = { | ||
"dep.js": function(__rolldown_runtime) { | ||
//#region dep.js | ||
__rolldown_runtime.__toCommonJS(__rolldown_runtime.exports); | ||
__rolldown_runtime.__export(__rolldown_runtime.exports, { default: () => dep_default }); | ||
var dep_default = "[dep ok]"; | ||
//#endregion | ||
}, | ||
}; | ||
``` | ||
## main1.js | ||
|
||
```js | ||
var __rolldown_modules = { | ||
"main1.js": function(__rolldown_runtime) { | ||
//#region main1.js | ||
__rolldown_runtime.__toCommonJS(__rolldown_runtime.exports); | ||
__rolldown_runtime.__export(__rolldown_runtime.exports, { default: () => main1_default }); | ||
var dep_exports = __rolldown_runtime.require("dep.js"); | ||
var main1_default = "main1: " + dep_exports.default; | ||
//#endregion | ||
}, | ||
}; | ||
``` | ||
## main2.js | ||
|
||
```js | ||
var __rolldown_modules = { | ||
"main2.js": function(__rolldown_runtime) { | ||
//#region main2.js | ||
__rolldown_runtime.__toCommonJS(__rolldown_runtime.exports); | ||
__rolldown_runtime.__export(__rolldown_runtime.exports, { default: () => main2_default }); | ||
var dep_exports = __rolldown_runtime.require("dep.js"); | ||
var main2_default = "main2: " + dep_exports.default; | ||
//#endregion | ||
}, | ||
}; | ||
``` |
1 change: 1 addition & 0 deletions
1
crates/rolldown/tests/rolldown/function/format/app/shared-chunk/dep.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default "[dep ok]" |
2 changes: 2 additions & 0 deletions
2
crates/rolldown/tests/rolldown/function/format/app/shared-chunk/main1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import dep from "./dep.js" | ||
export default "main1: " + dep; |
2 changes: 2 additions & 0 deletions
2
crates/rolldown/tests/rolldown/function/format/app/shared-chunk/main2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import dep from "./dep.js" | ||
export default "main2: " + dep; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters