We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
build.assetsDir
1 parent 21aff33 commit b3ad2a2Copy full SHA for b3ad2a2
.changeset/gold-insects-remain.md
@@ -0,0 +1,5 @@
1
+---
2
+"@react-router/dev": patch
3
4
+
5
+Fix support for custom `build.assetsDir`
packages/react-router-dev/vite/plugin.ts
@@ -3248,7 +3248,10 @@ export async function getEnvironmentOptionsResolvers(
3248
let routeChunkSuffix = routeChunkName
3249
? `-${kebabCase(routeChunkName)}`
3250
: "";
3251
- return `assets/[name]${routeChunkSuffix}-[hash].js`;
+ return path.posix.join(
3252
+ viteUserConfig.build?.assetsDir ?? "assets",
3253
+ `[name]${routeChunkSuffix}-[hash].js`
3254
+ );
3255
},
3256
3257
0 commit comments