rollup-plugin-svelte
Advanced tools
Comparing version 7.1.4 to 7.1.5
24
index.js
@@ -5,3 +5,3 @@ const path = require('path'); | ||
const { createFilter } = require('@rollup/pluginutils'); | ||
const { compile, preprocess } = require('svelte/compiler'); | ||
const { compile, preprocess, VERSION } = require('svelte/compiler'); | ||
@@ -16,3 +16,3 @@ const PREFIX = '[rollup-plugin-svelte]'; | ||
'onwarn', | ||
'preprocess' | ||
'preprocess', | ||
]); | ||
@@ -31,3 +31,5 @@ | ||
compilerOptions.format = 'esm'; | ||
if (VERSION[0] === '3') { | ||
compilerOptions.format = 'esm'; | ||
} | ||
@@ -62,8 +64,3 @@ for (const key in rest) { | ||
if (cache_emit.has(importee)) return importee; | ||
if ( | ||
!importer || | ||
importee[0] === '.' || | ||
importee[0] === '\0' || | ||
path.isAbsolute(importee) | ||
) | ||
if (!importer || importee[0] === '.' || importee[0] === '\0' || path.isAbsolute(importee)) | ||
return null; | ||
@@ -110,3 +107,5 @@ | ||
if (!warned) { | ||
console.error('\n\u001B[1m\u001B[31mWARNING: Your @rollup/plugin-node-resolve configuration\'s \'exportConditions\' array should include \'svelte\'. See https://github.com/sveltejs/rollup-plugin-svelte#svelte-exports-condition for more information\u001B[39m\u001B[22m\n'); | ||
console.error( | ||
'\n\u001B[1m\u001B[31mWARNING: Your @rollup/plugin-node-resolve configuration\'s \'exportConditions\' array should include \'svelte\'. See https://github.com/sveltejs/rollup-plugin-svelte#svelte-exports-condition for more information\u001B[39m\u001B[22m\n' | ||
); | ||
warned = true; | ||
@@ -143,4 +142,3 @@ } | ||
const processed = await preprocess(code, rest.preprocess, { filename }); | ||
if (processed.dependencies) | ||
dependencies.push(...processed.dependencies); | ||
if (processed.dependencies) dependencies.push(...processed.dependencies); | ||
if (processed.map) svelte_options.sourcemap = processed.map; | ||
@@ -171,4 +169,4 @@ code = processed.code; | ||
return compiled.js; | ||
} | ||
}, | ||
}; | ||
}; |
{ | ||
"version": "7.1.4", | ||
"version": "7.1.5", | ||
"name": "rollup-plugin-svelte", | ||
@@ -4,0 +4,0 @@ "description": "Compile Svelte components with Rollup", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14104
168