diff --git a/src/compiler/preprocess/index.ts b/src/compiler/preprocess/index.ts index 1a13b869e7af..d90d4814d787 100644 --- a/src/compiler/preprocess/index.ts +++ b/src/compiler/preprocess/index.ts @@ -94,8 +94,8 @@ export default async function preprocess( for (const fn of script) { source = await replace_async( source, - /| \ No newline at end of file diff --git a/test/preprocess/samples/style-self-closing/_config.js b/test/preprocess/samples/style-self-closing/_config.js new file mode 100644 index 000000000000..0a05cd3d641e --- /dev/null +++ b/test/preprocess/samples/style-self-closing/_config.js @@ -0,0 +1,12 @@ +import * as assert from "assert"; + +export default { + preprocess: { + style: ({ content, attributes: { color } }) => { + assert.equal(content, ""); + return { + code: `div { color: ${color}; }` + }; + } + } +}; diff --git a/test/preprocess/samples/style-self-closing/input.svelte b/test/preprocess/samples/style-self-closing/input.svelte new file mode 100644 index 000000000000..07176c87e5b2 --- /dev/null +++ b/test/preprocess/samples/style-self-closing/input.svelte @@ -0,0 +1,3 @@ +