Skip to content

Commit 5dcecb0

Browse files
authored
Document compilationoptions (#161)
* Document compilerOptions in README
1 parent 5a1c166 commit 5dcecb0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,23 @@ module.exports = {
167167

168168
This should create an additional `styles.css.map` file.
169169

170+
### Svelte Compiler options
171+
172+
You can specify additional arbitrary compilation options with the `compilerOptions` config key, which are passed directly to the underlying Svelte compiler:
173+
```js
174+
...
175+
use: {
176+
loader: 'svelte-loader',
177+
options: {
178+
compilerOptions: {
179+
// additional compiler options here
180+
generate: 'ssr', // for example, SSR can be enabled here
181+
}
182+
},
183+
},
184+
...
185+
```
186+
170187
### Hot Reload
171188

172189
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).

0 commit comments

Comments
 (0)