From 2dd2cb2a99f96a75bd8bdc3df7799bfca2d5be82 Mon Sep 17 00:00:00 2001 From: Kevin Chappell Date: Wed, 30 Oct 2024 15:03:33 -0700 Subject: [PATCH] fix: demo assets --- src/demo/index.html | 15 +++------------ src/demo/js/index.js | 2 +- vite.config.js | 9 ++++++--- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/demo/index.html b/src/demo/index.html index 0c061f51..3bb7a8a4 100644 --- a/src/demo/index.html +++ b/src/demo/index.html @@ -14,16 +14,6 @@
-
-
-
- -
-
-

Rendered Form

+
+

Rendered Form

+
diff --git a/src/demo/js/index.js b/src/demo/js/index.js index 4fa4d697..fe857e49 100644 --- a/src/demo/js/index.js +++ b/src/demo/js/index.js @@ -4,7 +4,7 @@ import { editorOptions, renderOptions } from './options/index.js' import { editorButtons } from './actionButtons.js' import { editorEvents } from './events.js' -import { FormeoEditor, FormeoRenderer } from 'formeo' +import { FormeoEditor, FormeoRenderer } from '../../lib/js/index.js' const editor = new FormeoEditor(editorOptions) const renderer = new FormeoRenderer(renderOptions) diff --git a/vite.config.js b/vite.config.js index 0ed2e016..2369cbcf 100644 --- a/vite.config.js +++ b/vite.config.js @@ -60,9 +60,6 @@ export default defineConfig({ demo: resolve(__dirname, 'src/demo/index.html'), }, output: { - manualChunks: { - formeo: ['formeo'], - }, entryFileNames: 'assets/js/[name].min.js', chunkFileNames: 'assets/js/[name].min.js', assetFileNames: assetInfo => { @@ -71,6 +68,7 @@ export default defineConfig({ return `assets/${getExtType(assetInfo)}/[name].${ext}` }, }, + external: ['formeo'], }, outDir: resolve(__dirname, 'dist/demo'), minify: 'terser', @@ -115,6 +113,11 @@ export default defineConfig({ src: resolve('node_modules', '@draggable/formeo-languages/dist/lang/*'), dest: './assets/lang', }, + { + src: resolve('dist/formeo.umd.js'), + dest: './assets/js/', + rename: 'formeo.min.js', + }, ], }), ],