Skip to content

Commit 39641d7

Browse files
committed
Make filename relative
1 parent 4813a72 commit 39641d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,11 @@ module.exports = function svelte(options = {}) {
240240
}
241241
: {};
242242

243+
const filename = path.relative(process.cwd(), id);
243244
const compiled = compile(
244245
code,
245246
Object.assign(base_options, fixed_options, {
246-
filename: id
247+
filename
247248
}, major_version >= 3 ? null : {
248249
name: capitalize(sanitize(id))
249250
})

0 commit comments

Comments
 (0)