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

svelte-loader

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-loader - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

4

CHANGELOG.md
# svelte-loader changelog
## 2.5.1
* Wrap components with proxies when hot reloading ([#44](https://github.com/sveltejs/svelte-loader/pull/44))
## 2.5.0

@@ -4,0 +8,0 @@

9

index.js

@@ -11,4 +11,2 @@ const { basename, extname, posix, relative } = require('path');

let proxyComponent = $2;
if (module.hot) {

@@ -23,10 +21,11 @@

configure(${options});
proxyComponent = register(${id}, $2);
$2 = register(${id}, $2);
} else {
// hot update
reload(${id}, proxyComponent);
$2 = reload(${id}, $2);
}
}
export default proxyComponent;
export default $2;
`;

@@ -33,0 +32,0 @@

@@ -21,3 +21,11 @@ import { Registry, configure as configureProxy, createProxy } from 'svelte-dev-helper';

return createProxy(id);
//create the proxy itself
const proxy = createProxy(id);
//patch the registry record with proxy constructor
const record = Registry.get(id);
record.proxy = proxy;
Registry.set(id, record);
return proxy;
}

@@ -37,6 +45,9 @@

//re-render the proxies
//re-render the proxy instances
record.instances.slice().forEach(function(instance) {
instance && instance._rerender();
});
//return the original proxy constructor that was `register()`-ed
return record.proxy;
}
{
"name": "svelte-loader",
"version": "2.5.0",
"version": "2.5.1",
"author": "Nico Rehwaldt <git_nikku@nixis.de>",

@@ -5,0 +5,0 @@ "description": "A webpack loader for svelte",

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