@sveltejs/kit 2.15.0 → 2.15.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "2.15.0",
3
+ "version": "2.15.1",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -186,10 +186,6 @@ class BaseProvider {
186
186
  this.#style_src.push(source);
187
187
  }
188
188
 
189
- if (this.#style_src_needs_csp) {
190
- this.#style_src.push(source);
191
- }
192
-
193
189
  if (this.#style_src_attr_needs_csp) {
194
190
  this.#style_src_attr.push(source);
195
191
  }
@@ -228,19 +228,18 @@ export async function render_response({
228
228
  return `${assets}/${path}`;
229
229
  };
230
230
 
231
- if (client.inline?.style) {
232
- head += `\n\t<style>${client.inline.style}</style>`;
233
- }
234
-
235
- if (inline_styles.size > 0) {
236
- const content = Array.from(inline_styles.values()).join('\n');
231
+ // inline styles can come from `bundleStrategy: 'inline'` or `inlineStyleThreshold`
232
+ const style = client.inline
233
+ ? client.inline?.style
234
+ : Array.from(inline_styles.values()).join('\n');
237
235
 
236
+ if (style) {
238
237
  const attributes = __SVELTEKIT_DEV__ ? [' data-sveltekit'] : [];
239
238
  if (csp.style_needs_nonce) attributes.push(` nonce="${csp.nonce}"`);
240
239
 
241
- csp.add_style(content);
240
+ csp.add_style(style);
242
241
 
243
- head += `\n\t<style${attributes.join('')}>${content}</style>`;
242
+ head += `\n\t<style${attributes.join('')}>${style}</style>`;
244
243
  }
245
244
 
246
245
  for (const dep of stylesheets) {
@@ -1,4 +1,5 @@
1
- import { BROWSER } from 'esm-env';
1
+ // @ts-ignore - need to publish types for sub-package imports
2
+ import BROWSER from 'esm-env/browser';
2
3
 
3
4
  const param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
4
5
 
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.15.0';
4
+ export const VERSION = '2.15.1';