Releases: vuejs/repl
Releases · vuejs/repl
v4.0.2
v4.0.1
v4.0.0
Notable Changes
ReplStore
is an interface instead of a class. Replacenew ReplStore()
withuseStore()
.sfcOptions
is removed from props, and renamedoptions
tosfcOptions
in store.- Removed
store.state
property and merged it as the top level ofStore
. - Moved
serializedState
as the second argument ofuseStore
. - Removed
StoreOptions
and merged toStoreState
. - Removed
customElement
option, now get it fromsfcOptions.script.customElement
. defaultVueRuntimeURL
,defaultVueRuntimeProdURL
,defaultVueServerRendererURL
is removed fromuseStore
, useuseVueImportMap
instead.
Please take a look at d01bf55 for full changes.
Migration Guide
Please read Advanced Usage first.
ReplStore
Usage
-
Replace
new ReplStore()
withuseStore()
. -
The first parameter accepted by
useStore
is a Ref Map; please useref
to wrap the options.const sfcOptions = ref({}) useStore({ sfcOptions })
-
Methods like
store.setVueVersion
andstore.toggleProduction
have been removed. Please manually pass theref
and directly assign values to it.store.vueVersion = '3.4.6'
-
Moved
serializedState
as the second argument ofuseStore
.const store = useStore( {}, // initial state // initialize repl with previously serialized state location.hash, )
useVueImportMap
- The logic related to Vue versions has been abstracted to
useVueImportMap
.const { importMap: builtinImportMap, vueVersion, productionMode, } = useVueImportMap({ // specify the default URL to import Vue runtime from in the sandbox // default is the CDN link from jsdelivr.com with version matching Vue's version // from peerDependency runtimeDev: 'cdn link to vue.runtime.esm-browser.js', runtimeProd: 'cdn link to vue.runtime.esm-browser.prod.js', serverRenderer: 'cdn link to server-renderer.esm-browser.js', vueVersion: 'initial vue version' }) const store = useStore({ builtinImportMap, vueVersion, })
🚨 Breaking Changes
🚀 Features
🐞 Bug Fixes
- Don't re-create import map file - by @sxzz (9e6f0)
- Pass readonly in code mirror editor - by @sxzz (11001)
View changes on GitHub
v4.0.0-beta.0
v4.0.0-alpha.1
v3.4.0
v4.0.0-alpha.0
🚨 Breaking Changes
🚀 Features
🐞 Bug Fixes
- Don't show tsconfig if not present - by @sxzz (ca548)
- Add corresponding black theme background - by @btea in #206 (3921c)
- Don't overwrite
a
tag without href - by @woshichaorens and @sxzz in #209 (c7fcf)
View changes on GitHub
v3.3.0
🚀 Features
- Apply theme to preview - by @btea in #200 (7ae10)
- Support custom template - by @JinweiOS in #196 (8038b)
- Add theme as classname to sandbox - by @btea in #203 (7e9dc)
- Mutable sfc options - by @sxzz (9e83b)
🐞 Bug Fixes
- Serialize import maps - by @sxzz (e085e)
- Default to white color on dark theme - by @pdanpdan in #202 (48103)
View changes on GitHub
v3.2.0
🚀 Features
🐞 Bug Fixes
- Preview: Fix style loading delay - by @Alfred-Skyblue in #191 (ece44)
- codemirror: Fix codemirror editor showing nothing on start on small layouts when starting in ouput mode - by @pdanpdan in #181 (6d759)
- messages: Place error messages in editor in front of bottom toggles - by @pdanpdan in #183 (b1594)