sp-dev-fx-property-controls
sp-dev-fx-property-controls copied to clipboard
Webpack 5 issues
Category
- [ ] Enhancement
- [ X] Bug
- [ ] Question
Version
3.17.0
Expected / Desired Behavior / Question
All controls should work with WebPack 5 that is used in SPFx 1.19.0
Observed Behavior
Controls that uses imports from FluentUI that are not specified in the package.json fails when using WebPack 5
Steps to Reproduce
Add a control using an unsupported import and build in a SPFx 1.19.0 project. Examples:
//PropertyFieldSwatchColorPicker
import { getColorFromString } from '@fluentui/react/lib/utilities/color/colors';
//should instead be
import { getColorFromString } from '@fluentui/react/lib/Color';
//PropertyFieldDropdownWithCalloutHost
import { Dropdown, IDropdownProps, IDropdownOption } from '@fluentui/react/lib/components/Dropdown';
//should instead be
import { Dropdown, IDropdownProps, IDropdownOption } from '@fluentui/react/lib/Dropdown';
Reference: SPFx 1.19.0 - Error during build with [object Object] errors that didn't happen in previous versions