Skip to content

Commit

Permalink
docs: CSS ?inline query parameter (#8050)
Browse files Browse the repository at this point in the history
Co-authored-by: patak <[email protected]>
Co-authored-by: Bjorn Lu <[email protected]>
  • Loading branch information
3 people authored Jun 1, 2022
1 parent 5ab336a commit 01b5ebf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/guide/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ Vite improves `@import` resolving for Sass and Less so that Vite aliases are als

You can also use CSS modules combined with pre-processors by prepending `.module` to the file extension, for example `style.module.scss`.

### Disabling CSS injection into the page

The automatic injection of CSS contents can be turned off via the `?inline` query parameter. In this case, the processed CSS string is returned as the module's default export as usual, but the styles aren't injected to the page.

```js
import styles from './foo.css' // will be injected into the page
import otherStyles from './bar.css?inline' // will not be injected into the page
```

## Static Assets

Importing a static asset will return the resolved public URL when it is served:
Expand Down

0 comments on commit 01b5ebf

Please sign in to comment.