Skip to content

Commit

Permalink
feat: turn on autoCodeSplitting by default (#20)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SeanCassiere authored Feb 24, 2025
1 parent 8ea20fa commit 3c62eb2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist
app-*
my-app
.DS_Store

.vscode
2 changes: 1 addition & 1 deletion templates/react/base/vite.config.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import federationConfig from "./module-federation.config.js";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [<% if(fileRouter) { %>TanStackRouterVite(), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
plugins: [<% if(fileRouter) { %>TanStackRouterVite({ autoCodeSplitting: true }), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
test: {
globals: true,
environment: "jsdom",
Expand Down
2 changes: 1 addition & 1 deletion templates/solid/base/vite.config.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import federationConfig from "./module-federation.config.js";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [<% if (addOnEnabled['module-federation']) { %>federation(federationConfig), <% } %><%if (fileRouter) { %>
TanStackRouterVite({ target: 'solid' }),<% } %>
TanStackRouterVite({ target: 'solid', autoCodeSplitting: true }),<% } %>
solidPlugin(),
tailwindcss(),
],<% if (addOnEnabled['solid-ui']) { %>
Expand Down

0 comments on commit 3c62eb2

Please sign in to comment.