chore(framework): add example of admin's vite configurations (#11283)
This commit is contained in:
1 parent
f4c2cd112e
commit
c366ae3b61
1 file changed
+19
-1
@@ -89,8 +89,26 @@ export type AdminOptions = {
|
|||||||
/**
|
/**
|
||||||
* Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
|
* Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
|
||||||
* and returns the modified configuration. The default value is `undefined`.
|
* and returns the modified configuration. The default value is `undefined`.
|
||||||
|
*
|
||||||
|
* Learn about configurations you can pass to Vite in [Vite's documentation](https://vite.dev/config/).
|
||||||
*
|
*
|
||||||
* @privateRemarks TODO Add example
|
* @example
|
||||||
|
* For example, if you're using a third-party library that isn't ESM-compatible, add it to Vite's `optimizeDeps` configuration:
|
||||||
|
*
|
||||||
|
* ```ts title="medusa-config.ts"
|
||||||
|
* module.exports = defineConfig({
|
||||||
|
* admin: {
|
||||||
|
* vite: () => {
|
||||||
|
* return {
|
||||||
|
* optimizeDeps: {
|
||||||
|
* include: ["qs"],
|
||||||
|
* },
|
||||||
|
* };
|
||||||
|
* },
|
||||||
|
* },
|
||||||
|
* // ...
|
||||||
|
* })
|
||||||
|
* ```
|
||||||
*/
|
*/
|
||||||
vite?: (config: InlineConfig) => InlineConfig
|
vite?: (config: InlineConfig) => InlineConfig
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user