@md-plugins/vite-examples-plugin 0.1.0-beta.1 → 0.1.0-beta.11
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 +18 -4
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ Install the plugin via your preferred package manager:
|
|
|
16
16
|
```bash
|
|
17
17
|
# with pnpm
|
|
18
18
|
pnpm add @md-plugins/vite-examples-plugin
|
|
19
|
+
# with bun
|
|
20
|
+
bun add @md-plugins/vite-examples-plugin
|
|
19
21
|
# with yarn
|
|
20
22
|
yarn add @md-plugins/vite-examples-plugin
|
|
21
23
|
# with npm
|
|
@@ -62,9 +64,15 @@ export default defineConfig(({ mode }) => {
|
|
|
62
64
|
],
|
|
63
65
|
build: {
|
|
64
66
|
chunkSizeWarningLimit: 650,
|
|
65
|
-
|
|
67
|
+
rolldownOptions: {
|
|
66
68
|
output: {
|
|
67
|
-
|
|
69
|
+
codeSplitting: {
|
|
70
|
+
groups: [
|
|
71
|
+
{
|
|
72
|
+
name: (moduleId) => viteManualChunks(moduleId) ?? null,
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
68
76
|
},
|
|
69
77
|
},
|
|
70
78
|
},
|
|
@@ -105,8 +113,14 @@ import { viteExamplesPlugin, viteManualChunks } from '@md-plugins/vite-examples-
|
|
|
105
113
|
if (ctx.prod && isClient) {
|
|
106
114
|
viteConf.build = viteConf.build || {}
|
|
107
115
|
viteConf.build.chunkSizeWarningLimit = 650
|
|
108
|
-
viteConf.build.
|
|
109
|
-
|
|
116
|
+
viteConf.build.rolldownOptions = viteConf.build.rolldownOptions || {}
|
|
117
|
+
viteConf.build.rolldownOptions.output = viteConf.build.rolldownOptions.output || {}
|
|
118
|
+
viteConf.build.rolldownOptions.output.codeSplitting = {
|
|
119
|
+
groups: [
|
|
120
|
+
{
|
|
121
|
+
name: (moduleId) => viteManualChunks(moduleId) ?? null,
|
|
122
|
+
},
|
|
123
|
+
],
|
|
110
124
|
}
|
|
111
125
|
}
|
|
112
126
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -7,8 +7,8 @@ let targetFolder = "";
|
|
|
7
7
|
function devLoad(id) {
|
|
8
8
|
if (id.startsWith(resolvedIdPrefix)) {
|
|
9
9
|
const query = `'/src/examples/${id.substring(id.indexOf(":") + 1)}/*.vue'`;
|
|
10
|
-
return `export const code = import.meta.glob(${query}
|
|
11
|
-
export const source = import.meta.glob(${query}, { query: '?raw', import: 'default'
|
|
10
|
+
return `export const code = import.meta.glob(${query})
|
|
11
|
+
export const source = import.meta.glob(${query}, { query: '?raw', import: 'default' })`;
|
|
12
12
|
}
|
|
13
13
|
return void 0;
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@md-plugins/vite-examples-plugin",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.11",
|
|
4
4
|
"description": "A Vite plugin for @md-plugins for handling imported examples in markdown files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown-it",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"tinyglobby": "^0.2.16"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"vite": "^8.0.
|
|
44
|
+
"vite": "^8.0.14"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "unbuild",
|