Skip to content

Commit d417fe5

Browse files
committed
wip: disable renderBuiltUrl in dev
1 parent 8419c88 commit d417fe5

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

packages/vite/src/node/config.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,15 @@ export async function resolveConfig(
17761776
)
17771777
}
17781778

1779+
const experimental = mergeWithDefaults(
1780+
configDefaults.experimental,
1781+
config.experimental ?? {},
1782+
)
1783+
if (command === 'serve' && experimental.fullBundleMode) {
1784+
// full bundle mode does not support experimental.renderBuiltUrl
1785+
experimental.renderBuiltUrl = undefined
1786+
}
1787+
17791788
resolved = {
17801789
configFile: configFile ? normalizePath(configFile) : undefined,
17811790
configFileDependencies: configFileDependencies.map((name) =>
@@ -1838,10 +1847,7 @@ export async function resolveConfig(
18381847
packageCache,
18391848
worker: resolvedWorkerOptions,
18401849
appType: config.appType ?? 'spa',
1841-
experimental: mergeWithDefaults(
1842-
configDefaults.experimental,
1843-
config.experimental ?? {},
1844-
),
1850+
experimental,
18451851
future:
18461852
config.future === 'warn'
18471853
? ({

packages/vite/src/node/plugins/asset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ async function fileToBuiltUrl(
473473
throw new Error('unreachable')
474474
},
475475
)
476-
if (typeof outputUrl === 'object') throw new Error('not supported')
476+
if (typeof outputUrl === 'object') throw new Error('unreachable')
477477
url = outputUrl
478478
} else {
479479
url = `__VITE_ASSET__${referenceId}__${postfix ? `$_${postfix}__` : ``}`

0 commit comments

Comments
 (0)