export default defineConfig(({ command }) => ({
base: command === "build" ? "/REPO-NAME/" : "/",
plugins: [vue(), vueJsx()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
}));
document.querySelector('#test').addEventListener('click', (event) => {
if (event.target !== event.currentTarget) {
return;
}
console.log('click');
});
const pattern = /#[A-ZА-ЯЁ]+/gi;
Record<string, Switch>
всё равно что:{
key1: {
name: 'Hello',
props: {
nav: {
count: 1,
key: 'local'
},
type: 'col',
label: 'hello',
value: 'world',
}
},
key2: {
name: 'Another Hello',
props: {
nav: {
count: 1,
key: 'local',
},
type: 'colWith',
label: 'label',
value: 'value',
main: 'hello there'
}
}
}
createWebHistory
наcreateWebHashHistory
вsrc/main.js
.