Skip to content

Commit 66e657d

Browse files
committed
fix: dynamic import breaking build
1 parent 85de82b commit 66e657d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/lib/js/components/controls/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import Control from './control.js'
1111
import { CONTROL_GROUP_CLASSNAME } from '../../constants.js'
1212
import Components, { Stages, Rows } from '../index.js'
1313

14-
// control configs
15-
1614
import defaultOptions from './options.js'
1715
import { get, set } from '../../common/utils/object.mjs'
1816

@@ -376,9 +374,11 @@ export class Controls {
376374
this.groupOrder = unique(groupOrder.concat(['common', 'html', 'layout']))
377375
this.options = options
378376

379-
const layoutControls = await import('./layout/index.js')
380-
const formControls = await import('./form/index.js')
381-
const htmlControls = await import('./html/index.js')
377+
const [layoutControls, formControls, htmlControls] = await Promise.all([
378+
import('./layout/index.js'),
379+
import('./form/index.js'),
380+
import('./html/index.js'),
381+
])
382382

383383
const allControls = [layoutControls.default, formControls.default, htmlControls.default].flat()
384384

vite.config.lib.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default defineConfig({
3636
},
3737
output: {
3838
assetFileNames: 'formeo.min.[ext]',
39+
inlineDynamicImports: true,
3940
},
4041
},
4142
},

0 commit comments

Comments
 (0)