Skip to content

Commit

Permalink
Webpack 5 disallows import of named export from json file (webpack/we…
Browse files Browse the repository at this point in the history
…bpack#9246). Import font.json and extract css_prefix_text
  • Loading branch information
lucasnetau committed Aug 21, 2023
1 parent 58baf4e commit 3dfe45e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/js/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import control from './control'
import controlCustom from './control/custom'
import { unique, hyphenCase, markup as m } from './utils'
import { empty } from './dom'
import { css_prefix_text } from '../fonts/config.json'
import fontConfig from '../fonts/config.json'
import storageAvailable from 'storage-available'

const css_prefix_text = fontConfig.css_prefix_text

/**
* control parent class for creating control panel
*/
Expand Down
3 changes: 2 additions & 1 deletion src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import {
getContentType,
generateSelectorClassNames,
} from './utils'
import { css_prefix_text } from '../fonts/config.json'
import fontConfig from '../fonts/config.json'
const css_prefix_text = fontConfig.css_prefix_text

const { rowWrapperClass, colWrapperClass, tmpColWrapperClass, tmpRowPlaceholderClass, invisibleRowPlaceholderClass } =
gridClassNames
Expand Down

0 comments on commit 3dfe45e

Please sign in to comment.