Skip to content

Commit

Permalink
fix(playground): use fixed versions for esm vue
Browse files Browse the repository at this point in the history
Close #2510
  • Loading branch information
posva committed Dec 1, 2023
1 parent 44a80bd commit 4121e55
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/online-playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ if (hash.startsWith('__DEV__')) {
useDevMode.value = true
}
// TODO: we should fetch the latest version and set it by default here
const store = new ReplStore({
serializedState: hash,
defaultVueRuntimeURL:
'https://cdn.jsdelivr.net/npm/@vue/[email protected].4/+esm',
'https://cdn.jsdelivr.net/npm/@vue/[email protected].9/dist/runtime-dom.esm-browser.js',
defaultVueServerRendererURL:
'https://cdn.jsdelivr.net/npm/@vue/[email protected].4/+esm',
'https://cdn.jsdelivr.net/npm/@vue/[email protected].9/dist/server-renderer.esm-browser.js',
})
const previewOptions: ReplProps['previewOptions'] = {
Expand Down Expand Up @@ -67,13 +68,14 @@ if (!hash) {
imports: {
...store.getImportMap().imports,
pinia: import.meta.env.PROD
? `${location.origin}/pinia.esm-browser.js`
: `${location.origin}/src/pinia-dev-proxy`,
? `/pinia.esm-browser.js`
: `/src/pinia-dev-proxy`,
...(import.meta.env.PROD
? {
'@vue/devtools-api':
'https://cdn.jsdelivr.net/npm/@vue/[email protected]/lib/esm/index.js',
'vue-demi': 'https://cdn.jsdelivr.net/npm/[email protected]/+esm',
'vue-demi':
'https://cdn.jsdelivr.net/npm/[email protected]/lib/v3/index.mjs',
}
: {}),
},
Expand Down

0 comments on commit 4121e55

Please sign in to comment.