diff --git a/runtime/vue2/build.vite.config.ts b/runtime/vue2/build.vite.config.ts index c72bc1574..e8cb81094 100644 --- a/runtime/vue2/build.vite.config.ts +++ b/runtime/vue2/build.vite.config.ts @@ -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}`), - }, - - 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') }, - ], + rollupOptions: { + external: ['vue', 'vue-demi'], + }, }, }; } diff --git a/runtime/vue2/dev.vite.config.ts b/runtime/vue2/dev.vite.config.ts index fef11838a..db6add659 100644 --- a/runtime/vue2/dev.vite.config.ts +++ b/runtime/vue2/dev.vite.config.ts @@ -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', - }, - }, - }, }); diff --git a/runtime/vue2/page/index.html b/runtime/vue2/page/index.html index 62759d74e..551426155 100644 --- a/runtime/vue2/page/index.html +++ b/runtime/vue2/page/index.html @@ -25,10 +25,13 @@ display: none; } + + +
- + diff --git a/runtime/vue2/playground/index.html b/runtime/vue2/playground/index.html index 8fa2ba634..634e03bea 100644 --- a/runtime/vue2/playground/index.html +++ b/runtime/vue2/playground/index.html @@ -37,13 +37,14 @@ background-color: rgba(51, 153, 255, 0.5) !important; } + + +
- - \ No newline at end of file diff --git a/runtime/vue3/build.vite.config.ts b/runtime/vue3/build.vite.config.ts index 58a928ee4..54ba84ff1 100644 --- a/runtime/vue3/build.vite.config.ts +++ b/runtime/vue3/build.vite.config.ts @@ -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}`), - }, - - 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') }, - ], + rollupOptions: { + external: ['vue', 'vue-demi'], + }, }, }; } diff --git a/runtime/vue3/dev.vite.config.ts b/runtime/vue3/dev.vite.config.ts index 5544f46bc..93fb18485 100644 --- a/runtime/vue3/dev.vite.config.ts +++ b/runtime/vue3/dev.vite.config.ts @@ -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', - }, - }, - }, }); diff --git a/runtime/vue3/package.json b/runtime/vue3/package.json index 9323f837c..caded90ed 100644 --- a/runtime/vue3/package.json +++ b/runtime/vue3/package.json @@ -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", diff --git a/runtime/vue3/page/index.html b/runtime/vue3/page/index.html index d7227d622..b556fa758 100644 --- a/runtime/vue3/page/index.html +++ b/runtime/vue3/page/index.html @@ -25,11 +25,13 @@ display: none; } + + +
- diff --git a/runtime/vue3/playground/index.html b/runtime/vue3/playground/index.html index 40cf28c50..8ea2e470d 100644 --- a/runtime/vue3/playground/index.html +++ b/runtime/vue3/playground/index.html @@ -37,11 +37,13 @@ background-color: rgba(51, 153, 255, 0.5) !important; } + + +
- - + \ No newline at end of file