Skip to content

Commit 3c62eb2

Browse files
authored
feat: turn on autoCodeSplitting by default (#20)
Duplicating the work from #19, so that it's in the `alpha` branch as well. Also, make the necessary changes for this to be turned on in the Solid base.
1 parent 8ea20fa commit 3c62eb2

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ dist
33
app-*
44
my-app
55
.DS_Store
6+
7+
.vscode

templates/react/base/vite.config.js.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import federationConfig from "./module-federation.config.js";
1010

1111
// https://vitejs.dev/config/
1212
export default defineConfig({
13-
plugins: [<% if(fileRouter) { %>TanStackRouterVite(), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
13+
plugins: [<% if(fileRouter) { %>TanStackRouterVite({ autoCodeSplitting: true }), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
1414
test: {
1515
globals: true,
1616
environment: "jsdom",

templates/solid/base/vite.config.js.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import federationConfig from "./module-federation.config.js";
1010
// https://vitejs.dev/config/
1111
export default defineConfig({
1212
plugins: [<% if (addOnEnabled['module-federation']) { %>federation(federationConfig), <% } %><%if (fileRouter) { %>
13-
TanStackRouterVite({ target: 'solid' }),<% } %>
13+
TanStackRouterVite({ target: 'solid', autoCodeSplitting: true }),<% } %>
1414
solidPlugin(),
1515
tailwindcss(),
1616
],<% if (addOnEnabled['solid-ui']) { %>

0 commit comments

Comments
 (0)