Skip to content

Commit f2c8d6e

Browse files
author
Maxime Mangel
committed
Add documentation
1 parent 10205c7 commit f2c8d6e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/docs/javascript/features.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,20 @@ let hi : unit -> unit = importMember "./hello.js"
226226
// export const hi = hi_1;
227227
```
228228

229+
#### `importSideEffects`
230+
231+
`importSideEffects` is used when you wants to import a JavaScript module that has side effects, like a CSS file or a polyfill.
232+
233+
```fs
234+
importSideEffects "./style.css"
235+
// Generates:
236+
// import "./style.css";
237+
238+
importSideEffects "whatwg-fetch"
239+
// Generates:
240+
// import 'whatwg-fetch'
241+
```
242+
229243
## Emit, when F# is not enough
230244

231245
Emit is a features offered by Fable, that allows you to write JavaScript code directly in F#.

0 commit comments

Comments
 (0)