wip: filters compat
This commit is contained in:
@@ -8,12 +8,12 @@ export const compilerOptions: CompilerOptions = reactive({
|
||||
mode: 'module',
|
||||
filename: 'Foo.vue',
|
||||
prefixIdentifiers: false,
|
||||
optimizeImports: false,
|
||||
hoistStatic: false,
|
||||
cacheHandlers: false,
|
||||
scopeId: null,
|
||||
inline: false,
|
||||
ssrCssVars: `{ color }`,
|
||||
compatConfig: { MODE: 3 },
|
||||
bindingMetadata: {
|
||||
TestComponent: BindingTypes.SETUP_CONST,
|
||||
setupRef: BindingTypes.SETUP_REF,
|
||||
@@ -170,18 +170,20 @@ const App = {
|
||||
h('label', { for: 'inline' }, 'inline')
|
||||
]),
|
||||
|
||||
// toggle optimizeImports
|
||||
// compat mode
|
||||
h('li', [
|
||||
h('input', {
|
||||
type: 'checkbox',
|
||||
id: 'optimize-imports',
|
||||
disabled: !isModule || isSSR,
|
||||
checked: isModule && !isSSR && compilerOptions.optimizeImports,
|
||||
id: 'compat',
|
||||
checked: compilerOptions.compatConfig!.MODE === 2,
|
||||
onChange(e: Event) {
|
||||
compilerOptions.optimizeImports = (e.target as HTMLInputElement).checked
|
||||
compilerOptions.compatConfig!.MODE = (e.target as HTMLInputElement)
|
||||
.checked
|
||||
? 2
|
||||
: 3
|
||||
}
|
||||
}),
|
||||
h('label', { for: 'optimize-imports' }, 'optimizeImports')
|
||||
h('label', { for: 'compat' }, 'v2 compat mode')
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user