Skip to content

Commit

Permalink
fix: dynamic import breaking build
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Dec 30, 2024
1 parent 85de82b commit 66e657d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/js/components/controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import Control from './control.js'
import { CONTROL_GROUP_CLASSNAME } from '../../constants.js'
import Components, { Stages, Rows } from '../index.js'

// control configs

import defaultOptions from './options.js'
import { get, set } from '../../common/utils/object.mjs'

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

const layoutControls = await import('./layout/index.js')
const formControls = await import('./form/index.js')
const htmlControls = await import('./html/index.js')
const [layoutControls, formControls, htmlControls] = await Promise.all([
import('./layout/index.js'),
import('./form/index.js'),
import('./html/index.js'),
])

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

Expand Down
1 change: 1 addition & 0 deletions vite.config.lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default defineConfig({
},
output: {
assetFileNames: 'formeo.min.[ext]',
inlineDynamicImports: true,
},
},
},
Expand Down

0 comments on commit 66e657d

Please sign in to comment.