Skip to content

Commit 35402be

Browse files
committed
Drop normalize for older svelte versions
1 parent 962c7ca commit 35402be

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

index.js

+1-14
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,6 @@ function posixify(file) {
2020
return file.replace(/[/\\]/g, '/');
2121
}
2222

23-
function normalize(compiled) {
24-
// svelte.compile signature changed in 1.60 — this avoids
25-
// future deprecation warnings while preserving backwards
26-
// compatibility
27-
const js = compiled.js || { code: compiled.code, map: compiled.map };
28-
29-
const css = compiled.css && typeof compiled.css === 'object'
30-
? compiled.css
31-
: { code: compiled.css, map: compiled.cssMap };
32-
33-
return { js, css, ast: compiled.ast, warnings: compiled.warnings || compiled.stats.warnings || [] };
34-
}
35-
3623
const virtualModules = new Map();
3724
let index = 0;
3825

@@ -75,7 +62,7 @@ module.exports = function(source, map) {
7562
}
7663

7764
const compiled = compile(processed.toString(), compileOptions);
78-
let { js, css, warnings } = normalize(compiled);
65+
let { js, css, warnings } = compiled;
7966

8067
warnings.forEach(
8168
options.onwarn

0 commit comments

Comments
 (0)