mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-05 19:41:40 +08:00
fix(runtime): 使用vue-demi cdn
This commit is contained in:
parent
b198417ad1
commit
0cd83825b7
@ -56,10 +56,10 @@ export default defineConfig(({ mode }) => {
|
||||
return {
|
||||
plugins: [
|
||||
vue(),
|
||||
externalGlobals({ 'vue-demi': 'VueDemi', vue: 'Vue' }, { exclude: [`./${mode}/index.html`] }),
|
||||
legacy({
|
||||
targets: ['defaults', 'not IE 11'],
|
||||
}),
|
||||
externalGlobals({ vue: 'Vue' }, { exclude: [`./${mode}/index.html`] }),
|
||||
],
|
||||
|
||||
root: `./${mode}/`,
|
||||
@ -68,17 +68,17 @@ export default defineConfig(({ mode }) => {
|
||||
|
||||
base: `/tmagic-editor/playground/runtime/vue2/${mode}`,
|
||||
|
||||
optimizeDeps: {
|
||||
exclude: ['vue-demi'],
|
||||
},
|
||||
|
||||
build: {
|
||||
emptyOutDir: true,
|
||||
sourcemap: true,
|
||||
outDir: path.resolve(process.cwd(), `../../playground/public/runtime/vue2/${mode}`),
|
||||
rollupOptions: {
|
||||
external: ['vue', 'vue-demi'],
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm.js') },
|
||||
{ find: /^vue-demi$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm.js') },
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -46,25 +46,13 @@ export default defineConfig({
|
||||
|
||||
publicDir: 'public',
|
||||
|
||||
optimizeDeps: {
|
||||
exclude: ['vue-demi'],
|
||||
},
|
||||
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 8078,
|
||||
strictPort: true,
|
||||
},
|
||||
|
||||
build: {
|
||||
sourcemap: true,
|
||||
|
||||
cssCodeSplit: false,
|
||||
|
||||
rollupOptions: {
|
||||
input: {
|
||||
page: './page/index.html',
|
||||
playground: './playground/index.html',
|
||||
},
|
||||
output: {
|
||||
entryFileNames: 'assets/[name].js',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -25,10 +25,13 @@
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-demi"></script>
|
||||
</head>
|
||||
<body style="font-size: 14px">
|
||||
<div id="app"></div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
|
||||
|
||||
<script type="module" src="./main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -37,13 +37,14 @@
|
||||
background-color: rgba(51, 153, 255, 0.5) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-demi"></script>
|
||||
</head>
|
||||
<body style="font-size: 14px">
|
||||
|
||||
<div id="app" class="in-editor"></div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
|
||||
|
||||
<script type="module" src="./main.ts"></script>
|
||||
</body>
|
||||
</html>
|
@ -58,10 +58,10 @@ export default defineConfig(({ mode }) => {
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
externalGlobals({ 'vue-demi': 'VueDemi', vue: 'Vue' }, { exclude: [`./${mode}/index.html`] }),
|
||||
legacy({
|
||||
targets: ['defaults', 'not IE 11'],
|
||||
}),
|
||||
externalGlobals({ vue: 'Vue' }, { exclude: [`./${mode}/index.html`] }),
|
||||
],
|
||||
|
||||
root: `./${mode}/`,
|
||||
@ -70,17 +70,17 @@ export default defineConfig(({ mode }) => {
|
||||
|
||||
base: `/tmagic-editor/playground/runtime/vue3/${mode}`,
|
||||
|
||||
optimizeDeps: {
|
||||
exclude: ['vue-demi'],
|
||||
},
|
||||
|
||||
build: {
|
||||
emptyOutDir: true,
|
||||
sourcemap: true,
|
||||
outDir: path.resolve(process.cwd(), `../../playground/public/runtime/vue3/${mode}`),
|
||||
rollupOptions: {
|
||||
external: ['vue', 'vue-demi'],
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js') },
|
||||
{ find: /^vue-demi$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js') },
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -48,25 +48,13 @@ export default defineConfig({
|
||||
|
||||
publicDir: 'public',
|
||||
|
||||
optimizeDeps: {
|
||||
exclude: ['vue-demi'],
|
||||
},
|
||||
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 8078,
|
||||
strictPort: true,
|
||||
},
|
||||
|
||||
build: {
|
||||
sourcemap: true,
|
||||
|
||||
cssCodeSplit: false,
|
||||
|
||||
rollupOptions: {
|
||||
input: {
|
||||
page: './page/index.html',
|
||||
playground: './playground/index.html',
|
||||
},
|
||||
output: {
|
||||
entryFileNames: 'assets/[name].js',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -18,11 +18,11 @@
|
||||
"build:ds:event": "vite build --config build.vite.config.ts --mode ds:event"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tmagic/data-source": "1.4.7",
|
||||
"@tmagic/core": "1.4.7",
|
||||
"@tmagic/ui": "1.4.7",
|
||||
"@tmagic/data-source": "1.4.7",
|
||||
"@tmagic/schema": "1.4.7",
|
||||
"@tmagic/stage": "1.4.7",
|
||||
"@tmagic/ui": "1.4.7",
|
||||
"@tmagic/utils": "1.4.7",
|
||||
"@tmagic/vue-runtime-help": "^0.0.3",
|
||||
"axios": "^0.25.0",
|
||||
|
@ -25,11 +25,13 @@
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.4.21/vue.global.prod.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-demi"></script>
|
||||
</head>
|
||||
<body style="font-size: 14px">
|
||||
<div id="app"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.4.21/vue.global.prod.min.js"></script>
|
||||
<script type="module" src="./main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -37,11 +37,13 @@
|
||||
background-color: rgba(51, 153, 255, 0.5) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.4.21/vue.global.prod.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-demi"></script>
|
||||
</head>
|
||||
<body style="font-size: 14px">
|
||||
<div id="app" class="in-editor"></div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.4.21/vue.global.prod.min.js"></script>
|
||||
<script type="module" src="./main.ts"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user