Open tomatopickle opened 2 years ago
OK, I'll try it...
$ npm i -D vuepress-plugin-demo-code@next
# OR
$ pnpm i -D vuepress-plugin-demo-code@next
# OR
$ yarn add -D vuepress-plugin-demo-code@next
Does this support Vuepress 2 now?
Does this support Vuepress 2 now?
Yeah, try this one~
$ npm i -D vuepress-plugin-demo-code@next
# OR
$ yarn add -D vuepress-plugin-demo-code@next
@BuptStEve it doesn't work properly, is it a stable version?
@BuptStEve it doesn't work properly, is it a stable version?
what's wrong with it? Please provide some pictures or a demo? It's not a stable version, because vuepress@2 is in beta version.
@BuptStEve The path separator doesn't look good for windows OS
Plugin: vite:import-analysis
File: C:/Users/Walter/Github/oruga/packages/docs-next/.vuepress/.temp/internal/clientAppEnhances.js
3 | import clientAppEnhance2 from 'C:/Users/Walter/Github/oruga/packages/docs-next/node_modules/@vuepress/plugin-theme-data/lib/client/clientAppEnhance.js'
4 | import clientAppEnhance3 from 'C:/Users/Walter/Github/oruga/packages/docs-next/node_modules/@vuepress/theme-default/lib/client/clientAppEnhance.js'
5 | import clientAppEnhance4 from 'C:\Users\Walter\Github\oruga\packages\docs-next\node_modules\vuepress-plugin-demo-code\src\enhanceAppFile.js'
| ^
6 | import clientAppEnhance5 from 'C:/Users/Walter/Github/oruga/packages/docs-next/.vuepress/clientAppEnhance.ts'
and fiixing it manually
@jtommy Well, I get it. I'll fix this ASAP. Because there are too many breaking changes in Vuepress's beta version, such as this:
Thanks. What Vuepress 2 version are you supporting at the moment?
@jtommy 2.0.0-beta.27
I just make it compatible with 2.0.0-beta.37, please wait a moment.
Please try this one~ vuepress-plugin-demo-code@1.0.0-2
@BuptStEve 2.0.0-beta.38
Uncaught SyntaxError: The requested module '/@fs/C:/Users/Walter/Github/oruga/packages/docs-next/node_modules/codesandbox-import-utils/lib/api/define.js' does not provide an export named 'getParameters'
SyntaxError: The requested module '/@fs/C:/Users/Walter/Github/oruga/packages/docs-next/node_modules/escape-html/index.js' does not provide an export named 'default' (at highlight.js:2:8)
It looks like all import from external libs are broken, probably due to Vite
@jtommy Maybe add this for now~
// config.js
{
// ...
bundlerConfig: {
viteOptions: {
optimizeDeps: {
include: [
'prismjs',
'escape-html',
'codesandbox-import-utils/lib/api/define'
],
}
}
}
}
@jtommy I just publish this version: vuepress-plugin-demo-code@1.0.0-3
@BuptStEve thanks. I found the same workaround after my last message. Your last version is ok but you are setting Vue 2, why?
Anyway, I don't think I to be able to use your plugin because in the Vuepress 2.x there is a limit of a script for each .md
@jtommy I'll use Vue3 as default in next commit. It's fine that you won't use it, every package suits it's own scenario.
Or you might add a config to allow us to customize the Vue CDN.
I think the major part of components doc needs to show more than one example for each page (.MD).
@jtommy vuepress-plugin-demo-code@1.0.0-4
add vueVersion~
The feature "more than one <script>
" is not that easy with current code.
Any workaround to meet the need?
使用了没效果是怎么回事,v2.0.0-beta.38, vuepress-plugin-demo-code@1.0.0-4
使用了没效果是怎么回事,v2.0.0-beta.38, vuepress-plugin-demo-code@1.0.0-4
vuepress-plugin-demo-code@1.0.0-4 加了template 预览效果显示不出来,需要怎么处理?
@bobobabab 给个复现仓库看看?
@BuptStEve
@bobobabab template display: none;
了?
@BuptStEve 是的 要配置么还是直接css改
@BuptStEve vuepress2.0.0 beta4 改变了plugins的引入方式,这边有计划做适配吗
vuepress2.x support copy button?
Is your feature request related to a problem? Please describe. I really like this plugin, but I've switched to Vuepress 2. Can you please make this plugin Vuepress 2 compatible?
Thanks