@md-plugins/vite-examples-plugin 0.1.0-beta.13 → 0.1.0-beta.14

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 CHANGED
@@ -190,8 +190,8 @@ export const source = import.meta.glob('/src/examples/example1/*.vue', {
190
190
  In production, the plugin preloads example components and their raw source code, generating import and export statements:
191
191
 
192
192
  ```ts
193
- import Example1 from 'app/src/examples/example1/Example1.vue'
194
- import RawExample1 from 'app/src/examples/example1/Example1.vue?raw'
193
+ import Example1 from '@/examples/example1/Example1.vue'
194
+ import RawExample1 from '@/examples/example1/Example1.vue?raw'
195
195
 
196
196
  export { Example1, RawExample1 }
197
197
  ```
@@ -224,6 +224,13 @@ throw new Error('targetFolder is not defined')
224
224
 
225
225
  In case this README falls out of date, please refer to the [documentation](https://md-plugins.netlify.app/vite-plugins/vite-examples-plugin/overview) for the latest information.
226
226
 
227
+ ## Support
228
+
229
+ If vite-examples-plugin is useful in your workflow and you want to support ongoing maintenance:
230
+
231
+ GitHub Sponsors: https://github.com/sponsors/hawkeye64
232
+ PayPal: https://paypal.me/hawkeye64
233
+
227
234
  ## License
228
235
 
229
236
  This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
package/dist/index.mjs CHANGED
@@ -18,8 +18,8 @@ function prodLoad(id) {
18
18
  const files = globSync("*.vue", { cwd: join(targetFolder, exampleId) });
19
19
  const importList = files.map((entry) => entry.substring(0, entry.length - 4));
20
20
  const importStatements = importList.map(
21
- (entry) => `import ${entry} from 'app/src/examples/${exampleId}/${entry}.vue'
22
- import Raw${entry} from 'app/src/examples/${exampleId}/${entry}.vue?raw'`
21
+ (entry) => `import ${entry} from '@/examples/${exampleId}/${entry}.vue'
22
+ import Raw${entry} from '@/examples/${exampleId}/${entry}.vue?raw'`
23
23
  ).join("\n");
24
24
  const exportStatements = importList.map((entry) => `${entry},Raw${entry}`).join(",");
25
25
  return importStatements + `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-plugins/vite-examples-plugin",
3
- "version": "0.1.0-beta.13",
3
+ "version": "0.1.0-beta.14",
4
4
  "description": "A Vite plugin for @md-plugins for handling imported examples in markdown files.",
5
5
  "keywords": [
6
6
  "markdown-it",