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

rollup-plugin-svelte

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-svelte - npm Package Compare versions

Comparing version 1.6.1 to 1.7.0

4

CHANGELOG.md
# rollup-plugin-svelte changelog
## 1.7.0
* Pass all options through to Svelte (e.g. `dev`)
## 1.6.1

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

50

dist/rollup-plugin-svelte.cjs.js

@@ -20,2 +20,8 @@ 'use strict';

var pluginOptions = {
include: true,
exclude: true,
extensions: true
};
function svelte$1 ( options ) {

@@ -28,2 +34,22 @@ if ( options === void 0 ) options = {};

var fixedOptions = {};
Object.keys( options ).forEach( function (key) {
// add all options except include, exclude, extensions
if ( pluginOptions[ key ] ) { return; }
fixedOptions[ key ] = options[ key ];
});
fixedOptions.format = 'es';
fixedOptions.shared = require.resolve( 'svelte/shared.js' );
fixedOptions.onerror = function (err) {
var message = ( err.loc ? ("(" + (err.loc.line) + ":" + (err.loc.column) + ") ") : '' ) + err.message;
if ( err.frame ) { message += "\n" + (err.frame); }
var err2 = new Error( message );
err2.stack = err.stack;
throw err2;
};
return {

@@ -36,22 +62,6 @@ name: 'svelte',

var name = capitalize( sanitize( id ) );
return svelte.compile( code, {
name: name,
filename: id,
css: options.css,
generate: options.generate,
format: 'es',
shared: require.resolve( 'svelte/shared.js' ),
onerror: function onerror ( err ) {
var message = ( err.loc ? ("(" + (err.loc.line) + ":" + (err.loc.column) + ") ") : '' ) + err.message;
if ( err.frame ) { message += "\n" + (err.frame); }
var err2 = new Error( message );
err2.stack = err.stack;
throw err2;
}
});
return svelte.compile( code, Object.assign( {}, fixedOptions, {
name: capitalize( sanitize( id ) ),
filename: id
}));
}

@@ -58,0 +68,0 @@ };

@@ -18,2 +18,8 @@ import { basename, extname } from 'path';

var pluginOptions = {
include: true,
exclude: true,
extensions: true
};
function svelte$1 ( options ) {

@@ -26,2 +32,22 @@ if ( options === void 0 ) options = {};

var fixedOptions = {};
Object.keys( options ).forEach( function (key) {
// add all options except include, exclude, extensions
if ( pluginOptions[ key ] ) { return; }
fixedOptions[ key ] = options[ key ];
});
fixedOptions.format = 'es';
fixedOptions.shared = require.resolve( 'svelte/shared.js' );
fixedOptions.onerror = function (err) {
var message = ( err.loc ? ("(" + (err.loc.line) + ":" + (err.loc.column) + ") ") : '' ) + err.message;
if ( err.frame ) { message += "\n" + (err.frame); }
var err2 = new Error( message );
err2.stack = err.stack;
throw err2;
};
return {

@@ -34,22 +60,6 @@ name: 'svelte',

var name = capitalize( sanitize( id ) );
return compile( code, {
name: name,
filename: id,
css: options.css,
generate: options.generate,
format: 'es',
shared: require.resolve( 'svelte/shared.js' ),
onerror: function onerror ( err ) {
var message = ( err.loc ? ("(" + (err.loc.line) + ":" + (err.loc.column) + ") ") : '' ) + err.message;
if ( err.frame ) { message += "\n" + (err.frame); }
var err2 = new Error( message );
err2.stack = err.stack;
throw err2;
}
});
return compile( code, Object.assign( {}, fixedOptions, {
name: capitalize( sanitize( id ) ),
filename: id
}));
}

@@ -56,0 +66,0 @@ };

{
"name": "rollup-plugin-svelte",
"version": "1.6.1",
"version": "1.7.0",
"description": "Compile Svelte components with Rollup",

@@ -5,0 +5,0 @@ "main": "dist/rollup-plugin-svelte.cjs.js",

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