@forsakringskassan/vite-lib-config 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/vite.config.cjs +3 -3
- package/dist/vite.config.d.ts +5 -0
- package/dist/vite.config.mjs +2 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,3 +108,20 @@ export function setup(options: SetupOptions): void {
|
|
|
108
108
|
If the `setup` function is async (i.e. returns a `Promise`) it will be awaited before continuing.
|
|
109
109
|
|
|
110
110
|
Create `src/vite-dev/app.vue` containing the root component you want to serve as a development environment.
|
|
111
|
+
|
|
112
|
+
### Appending Plugins
|
|
113
|
+
|
|
114
|
+
If you need to use custom plugins in your library, remember to also include the default plugins, these will otherwise by overwritten.
|
|
115
|
+
|
|
116
|
+
#### `vite.config.ts`
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import {
|
|
120
|
+
defineConfig,
|
|
121
|
+
defaultPlugins,
|
|
122
|
+
} from "@forsakringskassan/vite-lib-config/vite";
|
|
123
|
+
|
|
124
|
+
export default defineConfig({
|
|
125
|
+
plugins: [...defaultPlugins, myFancyPlugin],
|
|
126
|
+
});
|
|
127
|
+
```
|
package/dist/vite.config.cjs
CHANGED
|
@@ -4882,6 +4882,7 @@ var require_semver2 = __commonJS({
|
|
|
4882
4882
|
var vite_config_exports = {};
|
|
4883
4883
|
__export(vite_config_exports, {
|
|
4884
4884
|
apimockPlugin: () => import_apimock_express2.vitePlugin,
|
|
4885
|
+
defaultPlugins: () => defaultPlugins,
|
|
4885
4886
|
defineConfig: () => defineConfig,
|
|
4886
4887
|
vuePlugin: () => vuePlugin
|
|
4887
4888
|
});
|
|
@@ -4960,9 +4961,7 @@ function lookupFile(nameWithoutExtension) {
|
|
|
4960
4961
|
return fileName;
|
|
4961
4962
|
}
|
|
4962
4963
|
}
|
|
4963
|
-
|
|
4964
|
-
`Entry is missing. ${nameWithoutExtension}.{${extensions.join(",")}}`
|
|
4965
|
-
);
|
|
4964
|
+
return `${nameWithoutExtension}.ts`;
|
|
4966
4965
|
}
|
|
4967
4966
|
|
|
4968
4967
|
// src/plugins/index-html-plugin.ts
|
|
@@ -11648,6 +11647,7 @@ function defineConfig(config) {
|
|
|
11648
11647
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11649
11648
|
0 && (module.exports = {
|
|
11650
11649
|
apimockPlugin,
|
|
11650
|
+
defaultPlugins,
|
|
11651
11651
|
defineConfig,
|
|
11652
11652
|
vuePlugin
|
|
11653
11653
|
});
|
package/dist/vite.config.d.ts
CHANGED
package/dist/vite.config.mjs
CHANGED
|
@@ -4938,9 +4938,7 @@ function lookupFile(nameWithoutExtension) {
|
|
|
4938
4938
|
return fileName;
|
|
4939
4939
|
}
|
|
4940
4940
|
}
|
|
4941
|
-
|
|
4942
|
-
`Entry is missing. ${nameWithoutExtension}.{${extensions.join(",")}}`
|
|
4943
|
-
);
|
|
4941
|
+
return `${nameWithoutExtension}.ts`;
|
|
4944
4942
|
}
|
|
4945
4943
|
|
|
4946
4944
|
// src/plugins/index-html-plugin.ts
|
|
@@ -11627,6 +11625,7 @@ function defineConfig(config) {
|
|
|
11627
11625
|
}
|
|
11628
11626
|
export {
|
|
11629
11627
|
vitePlugin as apimockPlugin,
|
|
11628
|
+
defaultPlugins,
|
|
11630
11629
|
defineConfig,
|
|
11631
11630
|
vuePlugin2 as vuePlugin
|
|
11632
11631
|
};
|