Skip to content

Commit 458e75c

Browse files
committed
wip: disable renderBuiltUrl in dev
1 parent a709bd1 commit 458e75c

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
@@ -1740,6 +1740,15 @@ export async function resolveConfig(
17401740
)
17411741
}
17421742

1743+
const experimental = mergeWithDefaults(
1744+
configDefaults.experimental,
1745+
config.experimental ?? {},
1746+
)
1747+
if (command === 'serve' && experimental.fullBundleMode) {
1748+
// full bundle mode does not support experimental.renderBuiltUrl
1749+
experimental.renderBuiltUrl = undefined
1750+
}
1751+
17431752
resolved = {
17441753
configFile: configFile ? normalizePath(configFile) : undefined,
17451754
configFileDependencies: configFileDependencies.map((name) =>
@@ -1802,10 +1811,7 @@ export async function resolveConfig(
18021811
packageCache,
18031812
worker: resolvedWorkerOptions,
18041813
appType: config.appType ?? 'spa',
1805-
experimental: mergeWithDefaults(
1806-
configDefaults.experimental,
1807-
config.experimental ?? {},
1808-
),
1814+
experimental,
18091815
future:
18101816
config.future === 'warn'
18111817
? ({

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)