Skip to content

Commit 71b1385

Browse files
committed
Added dependencies containing CSS to noExternal
1 parent 6d71664 commit 71b1385

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

vite.config.ts

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function hyperStyles(): Plugin {
4848
export default defineConfig({
4949
//root: path.resolve("./src"),
5050
resolve: {
51-
conditions: ["source"],
51+
//conditions: ["source"],
5252
alias: {
5353
"~": path.resolve("./src"),
5454
"#": path.resolve("./pages"),
@@ -94,7 +94,21 @@ export default defineConfig({
9494
// If not building for server context
9595
},
9696
ssr: {
97-
noExternal: ["@supabase/postgrest-js"],
97+
noExternal: [
98+
/** All dependencies that cannot be bundled on the server (e.g., due to CSS imports)
99+
* should be listed here.
100+
*/
101+
"@supabase/postgrest-js",
102+
"@macrostrat/ui-components",
103+
"@macrostrat/form-components",
104+
"@macrostrat/column-views",
105+
"@macrostrat/column-components",
106+
"@macrostrat/svg-map-components",
107+
"@macrostrat/data-components",
108+
"@macrostrat/map-interface",
109+
"@macrostrat/timescale",
110+
"@macrostrat/feedback-components",
111+
],
98112
},
99113
css: {
100114
preprocessorOptions: {
@@ -103,7 +117,7 @@ export default defineConfig({
103117
},
104118
},
105119
},
106-
optimizeDeps: {
107-
extensions: [".css"],
108-
},
120+
// optimizeDeps: {
121+
// extensions: [".css"],
122+
// },
109123
});

0 commit comments

Comments
 (0)