@vtmn/svelte
Advanced tools
Comparing version 0.59.2 to 0.60.0
{ | ||
"name": "@vtmn/svelte", | ||
"version": "0.59.2", | ||
"version": "0.60.0", | ||
"description": "Decathlon Design System - Vitamin Svelte components library", | ||
@@ -133,3 +133,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "b8365e5446269fea0567355b902e30239fd920f1" | ||
"gitHead": "b21ba27869a3f2b7295ac8bc093acdaaf9933e7b" | ||
} |
@@ -61,2 +61,34 @@ # `@vtmn/svelte` | ||
You should then preprocess the component CSS since they are imported in each corresponding component with an [`@import`](https://developer.mozilla.org/fr/docs/Web/CSS/@import) rule. There are several ways to resolve path of an `@import` rule, our recommended way is to use the [postcss-import](https://github.com/postcss/postcss-import) plugin. | ||
For example, here is a working `svelte.config.js`: | ||
```javascript | ||
import adapter from '@sveltejs/adapter-auto'; | ||
import preprocess from 'svelte-preprocess'; | ||
import atImport from 'postcss-import'; | ||
const config = { | ||
preprocess: preprocess({ | ||
postcss: { | ||
plugins: [ | ||
atImport({ | ||
root: process.cwd(), | ||
// import should default to node_modules, then look into src | ||
path: [ | ||
join(process.cwd(), 'node_modules'), | ||
join(process.cwd(), 'src'), | ||
], | ||
}), | ||
], | ||
}, | ||
}), | ||
kit: { | ||
adapter: adapter(), | ||
}, | ||
}; | ||
export default config; | ||
``` | ||
Then, you just need to import components you need. Example with `VtmnButton`: | ||
@@ -63,0 +95,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1473584
131