Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sveltejs/vite-plugin-svelte

Package Overview
Dependencies
Maintainers
4
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/vite-plugin-svelte - npm Package Compare versions

Comparing version 1.0.0-next.23 to 1.0.0-next.24

5

dist/index.js

@@ -810,3 +810,3 @@ var __create = Object.create;

if (configEnv.command === "serve") {
extraViteConfig.optimizeDeps = buildOptimizeDepsForSvelte(svelteDeps.filter((dep) => dep.type === "component-library"), options, config.optimizeDeps);
extraViteConfig.optimizeDeps = buildOptimizeDepsForSvelte(svelteDeps, options, config.optimizeDeps);
}

@@ -826,2 +826,3 @@ extraViteConfig.ssr = buildSSROptionsForSvelte(svelteDeps, options, config);

function buildOptimizeDepsForSvelte(svelteDeps, options, optimizeDeps) {
svelteDeps = svelteDeps.filter((dep) => dep.type === "component-library");
const include = [];

@@ -868,2 +869,4 @@ const exclude = ["svelte-hmr"];

}
} else {
svelteDeps = svelteDeps.filter((dep) => dep.type === "component-library");
}

@@ -870,0 +873,0 @@ noExternal.push(...Array.from(new Set(svelteDeps.map((s) => s.name))).filter((x) => {

2

package.json
{
"name": "@sveltejs/vite-plugin-svelte",
"version": "1.0.0-next.23",
"version": "1.0.0-next.24",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "dominikg",

@@ -202,3 +202,3 @@ /* eslint-disable no-unused-vars */

extraViteConfig.optimizeDeps = buildOptimizeDepsForSvelte(
svelteDeps.filter((dep) => dep.type === 'component-library'),
svelteDeps,
options,

@@ -231,2 +231,4 @@ config.optimizeDeps

): DepOptimizationOptions {
// only svelte component libraries needs to be processed for optimizeDeps, js libraries work fine
svelteDeps = svelteDeps.filter((dep) => dep.type === 'component-library');
// include svelte imports for optimization unless explicitly excluded

@@ -297,2 +299,8 @@ const include: string[] = [];

}
} else {
// for non-ssr build, we exclude svelte js library deps to make development faster
// and also because vite doesn't handle them properly.
// see https://github.com/sveltejs/vite-plugin-svelte/issues/168
// see https://github.com/vitejs/vite/issues/2579
svelteDeps = svelteDeps.filter((dep) => dep.type === 'component-library');
}

@@ -299,0 +307,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc