@solidjs/start 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config/index.d.ts CHANGED
@@ -11,7 +11,7 @@ type SolidStartInlineConfig = Omit<InlineConfig, "router"> & {
11
11
  * async: ssr is in async mode
12
12
  */
13
13
  ssr?: boolean | "async",
14
- solid: Options,
14
+ solid?: Options,
15
15
  extensions?: string[],
16
16
  server?: AppOptions['server'],
17
17
  appRoot?: string,
@@ -20,4 +20,4 @@ type SolidStartInlineConfig = Omit<InlineConfig, "router"> & {
20
20
  }
21
21
  }
22
22
 
23
- export declare function defineConfig(baseConfig?: SolidStartInlineConfig)
23
+ export declare function defineConfig(baseConfig?: SolidStartInlineConfig)
package/config/index.js CHANGED
@@ -79,7 +79,17 @@ export function defineConfig(baseConfig = {}) {
79
79
  extensions,
80
80
  target: "server",
81
81
  plugins: async () => [
82
- config("user", userConfig),
82
+ config("user", {
83
+ ...userConfig,
84
+ optimizeDeps: {
85
+ ...(userConfig.optimizeDeps || {}),
86
+ include: [
87
+ ...(userConfig.optimizeDeps?.include || []),
88
+ '@solidjs/start > source-map-js',
89
+ '@solidjs/start > error-stack-parser',
90
+ ],
91
+ },
92
+ }),
83
93
  ...(typeof plugins === "function" ? [...(await plugins())] : plugins),
84
94
 
85
95
  serverTransform({
@@ -121,7 +131,17 @@ export function defineConfig(baseConfig = {}) {
121
131
  extensions,
122
132
  target: "browser",
123
133
  plugins: async () => [
124
- config("user", userConfig),
134
+ config("user", {
135
+ ...userConfig,
136
+ optimizeDeps: {
137
+ ...(userConfig.optimizeDeps || {}),
138
+ include: [
139
+ ...(userConfig.optimizeDeps?.include || []),
140
+ '@solidjs/start > source-map-js',
141
+ '@solidjs/start > error-stack-parser',
142
+ ],
143
+ },
144
+ }),
125
145
  ...(typeof plugins === "function" ? [...(await plugins())] : plugins),
126
146
  serverFunctions.client({
127
147
  runtime: normalize(fileURLToPath(new URL("./server-runtime.jsx", import.meta.url)))
@@ -161,7 +181,17 @@ export function defineConfig(baseConfig = {}) {
161
181
  runtime: normalize(fileURLToPath(new URL("./server-fns-runtime.jsx", import.meta.url))),
162
182
  // routes: solidStartServerFsRouter({ dir: `${start.appRoot}/routes`, extensions }),
163
183
  plugins: async () => [
164
- config("user", userConfig),
184
+ config("user", {
185
+ ...userConfig,
186
+ optimizeDeps: {
187
+ ...(userConfig.optimizeDeps || {}),
188
+ include: [
189
+ ...(userConfig.optimizeDeps?.include || []),
190
+ '@solidjs/start > source-map-js',
191
+ '@solidjs/start > error-stack-parser',
192
+ ],
193
+ },
194
+ }),
165
195
  ...(typeof plugins === "function" ? [...(await plugins())] : plugins),
166
196
 
167
197
  solid({ ...start.solid, ssr: true, extensions: extensions.map(ext => `.${ext}`) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/start",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "type": "module",
5
5
  "author": "Ryan Carniato",
6
6
  "publishConfig": {
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "solid-js": "^1.8.8",
41
+ "solid-js": "^1.8.9",
42
42
  "vinxi": "0.1.1"
43
43
  },
44
44
  "dependencies": {
@@ -2,6 +2,7 @@ import {
2
2
  defineMiddleware,
3
3
  EventHandlerRequest,
4
4
  getRequestIP,
5
+ getRequestURL,
5
6
  H3Event,
6
7
  sendWebResponse,
7
8
  toWebRequest
@@ -18,9 +19,14 @@ const eventTraps = {
18
19
  };
19
20
 
20
21
  export function createFetchEvent(event: H3Event<EventHandlerRequest>): FetchEvent {
22
+ event.web ||
23
+ (event.web = {
24
+ url: getRequestURL(event),
25
+ request: toWebRequest(event)
26
+ });
21
27
  return new Proxy(
22
28
  {
23
- request: toWebRequest(event),
29
+ request: event.web.request,
24
30
  clientAddress: getRequestIP(event),
25
31
  locals: {},
26
32
  // @ts-ignore
@@ -27,6 +27,8 @@
27
27
  margin-bottom: 2rem;
28
28
  z-index: 10;
29
29
  gap: 0.5rem;
30
+ color: rgb(17 24 39);
31
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
30
32
  }
31
33
 
32
34
  .dev-overlay-navbar {
@@ -87,7 +89,6 @@
87
89
  }
88
90
 
89
91
  .dev-overlay-page-counter {
90
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
91
92
  font-size: 0.875rem;
92
93
  line-height: 1.25rem;
93
94
  font-weight: 600;
@@ -120,7 +121,6 @@
120
121
  border-radius: 9999px;
121
122
  background-color: rgb(249 250 251);
122
123
  padding: 0.25rem 0.5rem;
123
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
124
124
  font-size: 0.875rem;
125
125
  line-height: 1.25rem;
126
126
  font-weight: 600;
@@ -146,7 +146,6 @@
146
146
  }
147
147
 
148
148
  .dev-overlay-error-info {
149
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
150
149
  display: flex;
151
150
  flex-direction: column;
152
151
  gap: 0.25rem;
@@ -208,7 +207,6 @@
208
207
  }
209
208
 
210
209
  .dev-overlay-stack-frame-function {
211
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
212
210
  font-weight: 700;
213
211
  }
214
212
 
@@ -245,7 +243,6 @@
245
243
  .dev-overlay-stack-frames-code-source {
246
244
  font-size: 0.875rem;
247
245
  line-height: 1.25rem;
248
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
249
246
  color: rgb(249 250 251);
250
247
  }
251
248