Skip to content

Commit b07e20d

Browse files
refactor(vite): handle all future flags (#8221)
1 parent b60f9a6 commit b07e20d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/remix-dev/vite/plugin.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
334334
serverBuildPath,
335335
serverModuleFormat,
336336
relativeAssetsBuildDirectory,
337+
future,
337338
} = await resolveConfig(config, { rootDirectory });
338339

339340
return {
@@ -347,10 +348,7 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
347348
serverBuildPath,
348349
serverModuleFormat,
349350
relativeAssetsBuildDirectory,
350-
future: {
351-
v3_fetcherPersist: options.future?.v3_fetcherPersist === true,
352-
v3_relativeSplatPath: options.future?.v3_relativeSplatPath === true,
353-
},
351+
future,
354352
};
355353
};
356354

@@ -376,11 +374,7 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
376374
export const assetsBuildDirectory = ${JSON.stringify(
377375
pluginConfig.relativeAssetsBuildDirectory
378376
)};
379-
${
380-
pluginConfig.future
381-
? `export const future = ${JSON.stringify(pluginConfig.future)}`
382-
: ""
383-
};
377+
export const future = ${JSON.stringify(pluginConfig.future)};
384378
export const publicPath = ${JSON.stringify(pluginConfig.publicPath)};
385379
export const entry = { module: entryServer };
386380
export const routes = {

0 commit comments

Comments
 (0)