Visitar URL original
fix(node): allow `output.strictExecutionOrder` by the option validator · rolldown/rolldown@d4144ae · GitHub
Skip to content

Commit d4144ae

Browse files
committed
fix(node): allow output.strictExecutionOrder by the option validator
1 parent eead44d commit d4144ae

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎examples/hmr-raw/dev.config.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { defineDevConfig } from '@rolldown/test-dev-server';
33
export default defineDevConfig({
44
build: {
55
input: 'src/main.js',
6+
output: {
7+
strictExecutionOrder: true,
8+
},
69
experimental: {
710
devMode: {
811
new: true,
912
},
1013
incrementalBuild: true,
11-
strictExecutionOrder: true,
1214
},
1315
treeshake: false,
1416
},

‎examples/lazy/dev.config.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { defineDevConfig } from '@rolldown/test-dev-server';
33
export default defineDevConfig({
44
build: {
55
input: './src/entry-a.js',
6+
output: {
7+
strictExecutionOrder: true,
8+
},
69
experimental: {
710
devMode: {
811
lazy: true,
912
},
1013
incrementalBuild: true,
11-
strictExecutionOrder: true,
1214
},
1315
treeshake: false,
1416
},

‎packages/rolldown/src/utils/validator.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ const InputOptionsSchema = v.strictObject({
470470
enableComposingJsPlugins: v.optional(v.boolean()),
471471
viteMode: v.optional(v.boolean()),
472472
resolveNewUrlToAsset: v.optional(v.boolean()),
473-
strictExecutionOrder: v.optional(v.boolean()),
474473
onDemandWrapping: v.optional(v.boolean()),
475474
incrementalBuild: v.optional(v.boolean()),
476475
devMode: v.optional(DevModeSchema),
@@ -775,6 +774,10 @@ const OutputOptionsSchema = v.strictObject({
775774
v.optional(v.boolean()),
776775
v.description('Keep function and class names after bundling'),
777776
),
777+
strictExecutionOrder: v.pipe(
778+
v.optional(v.boolean()),
779+
v.description('Lets modules be executed in the order they are declared.'),
780+
),
778781
}) satisfies v.GenericSchema<OutputOptions>;
779782

780783
const getAddonDescription = (placement: 'bottom' | 'top', wrapper: 'inside' | 'outside') => {

‎packages/rolldown/tests/cli/__snapshots__/cli-e2e.test.ts.snap‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ OPTIONS
8585
--shim-missing-exports Create shim variables for missing exports.
8686
--sourcemap-base-url <sourcemap-base-url>Base URL used to prefix sourcemap paths.
8787
--sourcemap-debug-ids Inject sourcemap debug IDs.
88+
--strict-execution-order Lets modules be executed in the order they are declared.
8889
--top-level-var Rewrite top-level declarations to use \`var\`.
8990
--transform.assumptions.ignore-function-length .
9091
--transform.assumptions.no-document-all .

0 commit comments

Comments
 (0)