Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc fixes #1189

Merged
merged 1 commit into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions documentation/faq/45-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ question: How do I hash asset file names for caching?

You can have Vite process your assets by importing them as shown below:

```
```html
<script>
import imageSrc from '$lib/assets/image.png';
import imageSrc from '$lib/assets/image.png';
</script>
<img src={imageSrc} />

<img src="{imageSrc}" />
```
20 changes: 10 additions & 10 deletions documentation/faq/50-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ In `svelte.config.cjs` add [`vite.resolve.alias`](https://vitejs.dev/config/#res
// svelte.config.cjs
const path = require('path');
module.exports = {
kit: {
vite: {
resolve: {
alias: {
'$utils': path.resolve('./src/utils')
}
}
}
}
kit: {
vite: {
resolve: {
alias: {
$utils: path.resolve('./src/utils')
}
}
}
}
};
```

In `tsconfig.json` (for TypeScript users) or `jsconfig.json` (for JavaScript users) to make VS Code aware of the alias:

```json
```js
{
"compilerOptions": {
"paths": {
Expand Down
2 changes: 1 addition & 1 deletion documentation/faq/80-integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Please see [sveltejs/integrations](https://github.com/sveltejs/integrations#svel

### How do I use Babel, CoffeeScript, Less, PostCSS / SugarSS, Pug, scss/sass, Stylus, TypeScript, `global` styles, or replace?

Adding [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess) to your [`svelte.config.cjs](#configuration) is the first step. For many of the tools listed above, you only need to install the corresponding library such as `npm install -D sass`or `npm install -D less`. See the svelte-preprocess docs for full details.
Adding [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess) to your [`svelte.config.cjs`](#configuration) is the first step. For many of the tools listed above, you only need to install the corresponding library such as `npm install -D sass`or `npm install -D less`. See the svelte-preprocess docs for full details.

Also see [the examples above](/faq#how-do-i-use-x-with-sveltekit-how-do-i-setup-library-x) of setting up these and similar libraries.

Expand Down