From 486f75a331127d991c68df1ec7719a42b3e0de92 Mon Sep 17 00:00:00 2001 From: Smitty Date: Sat, 16 Jan 2021 20:56:42 -0500 Subject: [PATCH 1/4] Document compilerOptions in README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 360d74be..c3344654 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,23 @@ module.exports = { This should create an additional `styles.css.map` file. +## compilerOptions + +You can specify additional arbitrary compilation options with the `compilerOptions` config key, which are passed directly to the underlying Svelte compiler: +```js +... +use: { + loader: 'svelte-loader', + options: { + compilerOptions: { + // additional compiler options here + generate: "ssr", // for example, SSR can be enabled here + } + }, +}, +... +``` + ### Hot Reload This loader supports component-level HMR via the community supported [svelte-hmr](https://github.com/rixo/svelte-hmr) package. This package serves as a testbed and early access for Svelte HMR, while we figure out how to best include HMR support in the compiler itself (which is tricky to do without unfairly favoring any particular dev tooling). Feedback, suggestion, or help to move HMR forward is welcomed at [svelte-hmr](https://github.com/rixo/svelte-hmr/issues) (for now). From 7a7c9675aaa9c9bbf27c8f73bc0d609cdf8fcdea Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Sat, 16 Jan 2021 20:59:59 -0500 Subject: [PATCH 2/4] Fix indentation level --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3344654..bdfa243a 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ module.exports = { This should create an additional `styles.css.map` file. -## compilerOptions +### compilerOptions You can specify additional arbitrary compilation options with the `compilerOptions` config key, which are passed directly to the underlying Svelte compiler: ```js From 192a93527dedc1b6f26e4864ea732028d98fcbd7 Mon Sep 17 00:00:00 2001 From: Smittyvb Date: Sat, 16 Jan 2021 21:02:39 -0500 Subject: [PATCH 3/4] Use right quotes type --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bdfa243a..3e852b75 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ use: { options: { compilerOptions: { // additional compiler options here - generate: "ssr", // for example, SSR can be enabled here + generate: 'ssr', // for example, SSR can be enabled here } }, }, From 9cd836e53dea3912ef9b4ed84571334be5e54a92 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sat, 16 Jan 2021 19:25:05 -0800 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e852b75..83403f9e 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ module.exports = { This should create an additional `styles.css.map` file. -### compilerOptions +### Svelte Compiler options You can specify additional arbitrary compilation options with the `compilerOptions` config key, which are passed directly to the underlying Svelte compiler: ```js