@griddo/ax 12.3.0-beta.0 → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/__tests__/webpack5-migration.test.js +442 -0
- package/config/{jest/componentsMock.js → tests/componentsMock.cjs} +4 -1
- package/config/tests/reactEasyCropMock.js +15 -0
- package/config/tests/reactTimezoneMock.js +14 -0
- package/config/tests/setup.ts +41 -0
- package/config/webpack.config.js +183 -189
- package/config/webpackDevServer.config.js +63 -93
- package/config/webpackSchemas.config.js +6 -1
- package/package.json +33 -53
- package/public/img/icons/markdown.svg +6 -0
- package/scripts/build.js +4 -0
- package/scripts/start.js +38 -9
- package/src/__tests__/components/ActionMenu/ActionMenu.test.tsx +12 -12
- package/src/__tests__/components/Breadcrumb/Breadcrumb.test.tsx +2 -2
- package/src/__tests__/components/Browser/Browser.test.tsx +17 -25
- package/src/__tests__/components/BulkSelectionOptions/BulkSelectionOptions.test.tsx +3 -3
- package/src/__tests__/components/CategoryCell/CategoryCell.test.tsx +3 -2
- package/src/__tests__/components/ConfigPanel/ConfigPanel.test.tsx +4 -4
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/ConnectedField.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/NavConnectedField/NavConnectedField.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/Field/Field.test.tsx +3 -3
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/PageConnectedField.test.tsx +17 -14
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/TemplateManager/TemplateManager.test.tsx +4 -4
- package/src/__tests__/components/ConfigPanel/Form/Form.test.tsx +7 -6
- package/src/__tests__/components/ConfigPanel/GlobalPageForm/GlobalPageForm.test.tsx +11 -11
- package/src/__tests__/components/ConfigPanel/Header/Header.test.tsx +11 -10
- package/src/__tests__/components/ConfigPanel/NavigationForm/Field/Field.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/NavigationForm/NavigationForm.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/PreviewForm/PreviewForm.test.tsx +4 -3
- package/src/__tests__/components/ContextMenu/ContextMenu.test.tsx +24 -24
- package/src/__tests__/components/DragAndDrop/DragAndDrop.test.tsx +6 -5
- package/src/__tests__/components/ElementsTooltip/ElementsTooltip.test.tsx +1 -1
- package/src/__tests__/components/EmptyState/EmptyState.test.tsx +2 -2
- package/src/__tests__/components/ErrorCenter/ErrorCenter.test.tsx +11 -11
- package/src/__tests__/components/FieldContainer/FieldContainer.test.tsx +4 -4
- package/src/__tests__/components/Fields/AnalyticsField/AnalyticsField.test.tsx +3 -3
- package/src/__tests__/components/Fields/AnalyticsField/PageAnalytics/PageAnalytics.test.tsx +4 -4
- package/src/__tests__/components/Fields/AnalyticsField/StructuredDataAnalytics/StructuredDataAnalytics.test.tsx +3 -3
- package/src/__tests__/components/Fields/ArrayFieldGroup/ArrayFieldGroup.test.tsx +6 -5
- package/src/__tests__/components/Fields/AsyncCheckGroup/AsyncCheckGroup.test.tsx +19 -18
- package/src/__tests__/components/Fields/AsyncSelect/AsyncSelect.test.tsx +4 -3
- package/src/__tests__/components/Fields/Button/Button.test.tsx +4 -3
- package/src/__tests__/components/Fields/CheckField/CheckField.test.tsx +5 -5
- package/src/__tests__/components/Fields/CheckGroup/CheckGroup.test.tsx +10 -10
- package/src/__tests__/components/Fields/ColorPicker/ColorPicker.test.tsx +7 -6
- package/src/__tests__/components/Fields/ComponentArray/ComponentArray.test.tsx +3 -3
- package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/MixableComponentArray.test.tsx +45 -45
- package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/PasteModuleButton/PasteModuleButton.test.tsx +7 -6
- package/src/__tests__/components/Fields/ComponentArray/SameComponentArray/SameComponentArray.test.tsx +7 -7
- package/src/__tests__/components/Fields/ComponentContainer/ComponentContainer.test.tsx +55 -55
- package/src/__tests__/components/Fields/ConditionalField/ConditionalField.test.tsx +1 -1
- package/src/__tests__/components/Fields/DateField/DateField.test.tsx +6 -5
- package/src/__tests__/components/Fields/FieldGroup/FieldGroup.test.tsx +2 -2
- package/src/__tests__/components/Fields/FileField/FileField.test.tsx +4 -4
- package/src/__tests__/components/Fields/HeadingField/HeadingField.test.tsx +2 -2
- package/src/__tests__/components/Fields/HiddenField/HiddenField.test.tsx +3 -3
- package/src/__tests__/components/Fields/ImageField/ImageField.test.tsx +8 -7
- package/src/__tests__/components/Fields/IntegrationsField/IntegrationsField.test.tsx +9 -8
- package/src/__tests__/components/Fields/MultiCheckSelect/MultiCheckSelect.test.tsx +1 -1
- package/src/__tests__/components/Fields/MultiCheckSelectGroup/MultiCheckSelectGroup.test.tsx +7 -6
- package/src/__tests__/components/Fields/NoteField/NoteField.test.tsx +1 -1
- package/src/__tests__/components/Fields/NumberField/NumberField.test.tsx +8 -8
- package/src/__tests__/components/Fields/RadioField/RadioField.test.tsx +2 -2
- package/src/__tests__/components/Fields/ReferenceField/ReferenceField.test.tsx +17 -16
- package/src/__tests__/components/Fields/RichText/RichText.test.tsx +1 -1
- package/src/__tests__/components/Fields/Select/Select.test.tsx +1 -1
- package/src/__tests__/components/Fields/SliderField/SliderField.test.tsx +5 -4
- package/src/__tests__/components/Fields/SummaryButton/SummaryButton.test.tsx +2 -2
- package/src/__tests__/components/Fields/TagField/TagField.test.tsx +9 -9
- package/src/__tests__/components/Fields/TextArea/TextArea.test.tsx +13 -9
- package/src/__tests__/components/Fields/TextField/TextField.test.tsx +8 -8
- package/src/__tests__/components/Fields/TimeField/HourInput/HourInput.test.tsx +7 -6
- package/src/__tests__/components/Fields/TimeField/TimeField.test.tsx +4 -3
- package/src/__tests__/components/Fields/ToggleField/ToggleField.test.tsx +2 -2
- package/src/__tests__/components/Fields/Tooltip/Tooltip.test.tsx +6 -6
- package/src/__tests__/components/Fields/TranslateButton/TranslateButton.test.tsx +13 -13
- package/src/__tests__/components/Fields/UniqueCheck/UniqueCheck.test.tsx +1 -1
- package/src/__tests__/components/Fields/UrlField/UrlField.test.tsx +20 -19
- package/src/__tests__/components/Fields/VisualUniqueSelection/ImageSelection/ImageSelection.test.tsx +3 -2
- package/src/__tests__/components/Fields/VisualUniqueSelection/ScrollableSelection/ScrollableSelection.test.tsx +4 -3
- package/src/__tests__/components/Fields/VisualUniqueSelection/VisualUniqueSelection.test.tsx +1 -1
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.atoms.test.tsx +11 -11
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.helpers.test.tsx +13 -14
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.test.tsx +28 -28
- package/src/__tests__/components/FieldsBehavior/FieldsBehavior.test.tsx +15 -14
- package/src/__tests__/components/FloatingMenu/FloatingMenu.test.tsx +36 -35
- package/src/__tests__/components/FloatingPanel/FloatingPanel.test.tsx +10 -10
- package/src/__tests__/components/GuardModal/GuardModal.test.tsx +1 -1
- package/src/__tests__/components/HeadingsPreviewModal/ErrorsBanner/ErrorItem/ErrorItem.test.tsx +11 -11
- package/src/__tests__/components/HeadingsPreviewModal/ErrorsBanner/ErrorsBanner.test.tsx +4 -4
- package/src/__tests__/components/HeadingsPreviewModal/HeadingsPreviewModal.test.tsx +15 -14
- package/src/__tests__/components/IconAction/IconAction.test.tsx +2 -2
- package/src/__tests__/components/ImageDragAndDrop/CropStep/CropStep.test.tsx +3 -3
- package/src/__tests__/components/ImageDragAndDrop/ImageDragAndDrop.test.tsx +7 -7
- package/src/__tests__/components/KeywordsPreviewModal/KeywordItem/KeywordItem.test.tsx +5 -5
- package/src/__tests__/components/KeywordsPreviewModal/KeywordsPreviewModal.test.tsx +14 -13
- package/src/__tests__/components/KeywordsPreviewModal/atoms.test.tsx +13 -13
- package/src/__tests__/components/LanguageMenu/LanguageMenu.test.tsx +6 -6
- package/src/__tests__/components/Lists/Lists.test.tsx +1 -1
- package/src/__tests__/components/Loader/Loader.test.tsx +1 -1
- package/src/__tests__/components/Login/Login.test.tsx +32 -32
- package/src/__tests__/components/Login/RecoveryModal/RecoveryModal.test.tsx +10 -9
- package/src/__tests__/components/MainWrapper/AppBar/AppBar.test.tsx +21 -21
- package/src/__tests__/components/MenuItem/MenuItem.test.tsx +5 -5
- package/src/__tests__/components/Modal/Modal.test.tsx +20 -20
- package/src/__tests__/components/Nav/Nav.test.tsx +2 -2
- package/src/__tests__/components/Notification/Notification.test.tsx +2 -2
- package/src/__tests__/components/Pagination/Pagination.test.tsx +13 -14
- package/src/__tests__/components/ProfileImage/ProfileImage.test.tsx +6 -7
- package/src/__tests__/components/ReorderArrows/ReorderArrows.test.tsx +4 -3
- package/src/__tests__/components/ResizePanel/ResizePanel.test.tsx +10 -11
- package/src/__tests__/components/RestrictionsModal/CurrentAccessList/CurrentAccessList.test.tsx +7 -6
- package/src/__tests__/components/RestrictionsModal/OptionsStep/OptionsStep.test.tsx +12 -11
- package/src/__tests__/components/RestrictionsModal/RestrictionsModal.test.tsx +11 -10
- package/src/__tests__/components/RestrictionsModal/RolesList/RolesList.test.tsx +8 -8
- package/src/__tests__/components/RestrictionsModal/UsersList/UsersList.test.tsx +16 -15
- package/src/__tests__/components/SearchField/SearchField.test.tsx +13 -13
- package/src/__tests__/components/SideModal/SideModal.test.tsx +25 -23
- package/src/__tests__/components/SubNav/SubNav.test.tsx +1 -1
- package/src/__tests__/components/TableFilters/CategoryFilter/CategoryFilter.test.tsx +9 -8
- package/src/__tests__/components/TableFilters/CustomizeFilters/CustomizeFilters.test.tsx +5 -5
- package/src/__tests__/components/TableFilters/DateFilter/DateFilter.test.tsx +8 -8
- package/src/__tests__/components/TableFilters/LiveFilter/LiveFilter.test.tsx +11 -10
- package/src/__tests__/components/TableFilters/NameFilter/NameFilter.test.tsx +10 -10
- package/src/__tests__/components/TableFilters/RoleFilter/RoleFilter.test.tsx +5 -5
- package/src/__tests__/components/TableFilters/SiteFilter/SiteFilter.test.tsx +10 -9
- package/src/__tests__/components/TableFilters/StatusFilter/StatusFilter.test.tsx +9 -9
- package/src/__tests__/components/TableFilters/TranslationsFilter/TranslationsFilter.test.tsx +8 -8
- package/src/__tests__/components/TableFilters/TypeFilter/TypeFilter.test.tsx +5 -5
- package/src/__tests__/components/TableFilters/UsersFilter/UsersFilter.test.tsx +8 -8
- package/src/__tests__/components/TableList/TableList.test.tsx +4 -4
- package/src/__tests__/components/Tabs/Tabs.test.tsx +8 -9
- package/src/__tests__/components/Tag/Tag.test.tsx +3 -3
- package/src/__tests__/components/Toast/Toast.test.tsx +6 -6
- package/src/__tests__/gainup-trace.test.ts +67 -0
- package/src/__tests__/hooks/modals.test.tsx +4 -4
- package/src/__tests__/hooks/users.test.tsx +6 -5
- package/src/__tests__/modules/FileDrive/MarkdownFormat.test.tsx +58 -0
- package/src/__tests__/modules/FramePreview/FramePreview.test.tsx +40 -39
- package/src/__tests__/modules/FramePreview/HeadingsOverlay/HeadingsOverlay.test.tsx +11 -11
- package/src/__tests__/modules/Settings/Integrations/Integrations.test.tsx +2 -2
- package/src/__tests__/modules/Settings/Social/Social.test.tsx +4 -3
- package/src/__tests__/modules/Sites/Sites.test.tsx +5 -4
- package/src/__tests__/modules/Sites/SitesList/ListView/BulkHeader/BulkHeader.test.tsx +2 -2
- package/src/__tests__/modules/Sites/SitesList/SitesList.test.tsx +7 -6
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/DataStep/DataStep.test.tsx +6 -6
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/FinalStep/FinalStep.test.tsx +4 -4
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/CropView/CropView.test.tsx +3 -3
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/ImageStep.test.tsx +9 -5
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/UploadView/UploadView.test.tsx +8 -6
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/TimezoneStep/TimezoneStep.test.tsx +7 -7
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/WelcomeModal.test.tsx +1 -1
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/WelcomeStep/WelcomeStep.test.tsx +3 -3
- package/src/__tests__/modules/Users/Roles/BulkHeader/BulkHeader.test.tsx +3 -3
- package/src/__tests__/modules/Users/Roles/Roles.test.tsx +11 -10
- package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RoleItem/RoleItem.test.tsx +3 -3
- package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RolesModal.test.tsx +3 -3
- package/src/__tests__/modules/Users/UserCreate/SiteItem/SiteItem.test.tsx +3 -3
- package/src/__tests__/modules/Users/UserCreate/UserCreate.test.tsx +6 -5
- package/src/__tests__/modules/Users/UserList/UserItem/UserItem.test.tsx +9 -9
- package/src/__tests__/modules/Users/UserList/UserList.test.tsx +4 -4
- package/src/components/Flag/components/index.ts +30 -0
- package/src/components/Flag/index.tsx +3 -5
- package/src/components/Icon/components/index.ts +229 -0
- package/src/components/Icon/index.tsx +3 -7
- package/src/constants/index.ts +1 -1
- package/src/helpers/files.tsx +2 -0
- package/src/modules/App/Routing/NavMenu/index.tsx +4 -2
- package/src/modules/FileDrive/FileFilters/Type/index.tsx +1 -0
- package/tsconfig.json +1 -1
- package/config/jest/cssTransform.js +0 -14
- package/config/jest/fileMock.js +0 -1
- package/config/jest/fileTransform.js +0 -40
- package/config/jest/reactEasyCropMock.js +0 -15
- package/config/jest/reactTimezoneMock.js +0 -13
- package/config/jest/setup.js +0 -31
- package/config/jest/styleMock.js +0 -1
- package/config/pnpTs.js +0 -15
- package/src/__tests__/aiup-trace.test.ts +0 -23
- /package/config/{jest/test-utils.js → tests/test-utils.jsx} +0 -0
- /package/src/components/Flag/components/{Ca_ES.js → Ca_ES.jsx} +0 -0
- /package/src/components/Flag/components/{De_DE.js → De_DE.jsx} +0 -0
- /package/src/components/Flag/components/{En_GB.js → En_GB.jsx} +0 -0
- /package/src/components/Flag/components/{Es_ES.js → Es_ES.jsx} +0 -0
- /package/src/components/Flag/components/{Eu_ES.js → Eu_ES.jsx} +0 -0
- /package/src/components/Flag/components/{Fr_FR.js → Fr_FR.jsx} +0 -0
- /package/src/components/Flag/components/{It_IT.js → It_IT.jsx} +0 -0
- /package/src/components/Flag/components/{Pt_PT.js → Pt_PT.jsx} +0 -0
- /package/src/components/Icon/components/{Active.js → Active.jsx} +0 -0
- /package/src/components/Icon/components/{Add.js → Add.jsx} +0 -0
- /package/src/components/Icon/components/{AddCircle.js → AddCircle.jsx} +0 -0
- /package/src/components/Icon/components/{Alert.js → Alert.jsx} +0 -0
- /package/src/components/Icon/components/{AlignLeft.js → AlignLeft.jsx} +0 -0
- /package/src/components/Icon/components/{Back.js → Back.jsx} +0 -0
- /package/src/components/Icon/components/{BulletList.js → BulletList.jsx} +0 -0
- /package/src/components/Icon/components/{Button.js → Button.jsx} +0 -0
- /package/src/components/Icon/components/{Calendar.js → Calendar.jsx} +0 -0
- /package/src/components/Icon/components/{CancelEvent.js → CancelEvent.jsx} +0 -0
- /package/src/components/Icon/components/{Category.js → Category.jsx} +0 -0
- /package/src/components/Icon/components/{Change.js → Change.jsx} +0 -0
- /package/src/components/Icon/components/{Close.js → Close.jsx} +0 -0
- /package/src/components/Icon/components/{ClosePanel.js → ClosePanel.jsx} +0 -0
- /package/src/components/Icon/components/{CodeBody.js → CodeBody.jsx} +0 -0
- /package/src/components/Icon/components/{CodeHead.js → CodeHead.jsx} +0 -0
- /package/src/components/Icon/components/{CodeHeadBody.js → CodeHeadBody.jsx} +0 -0
- /package/src/components/Icon/components/{Collapsed.js → Collapsed.jsx} +0 -0
- /package/src/components/Icon/components/{ColorPicker.js → ColorPicker.jsx} +0 -0
- /package/src/components/Icon/components/{Compose.js → Compose.jsx} +0 -0
- /package/src/components/Icon/components/{Copy.js → Copy.jsx} +0 -0
- /package/src/components/Icon/components/{Copy2.js → Copy2.jsx} +0 -0
- /package/src/components/Icon/components/{Data.js → Data.jsx} +0 -0
- /package/src/components/Icon/components/{DataAdd.js → DataAdd.jsx} +0 -0
- /package/src/components/Icon/components/{Deactivate.js → Deactivate.jsx} +0 -0
- /package/src/components/Icon/components/{Delete.js → Delete.jsx} +0 -0
- /package/src/components/Icon/components/{Desktop.js → Desktop.jsx} +0 -0
- /package/src/components/Icon/components/{Disabled.js → Disabled.jsx} +0 -0
- /package/src/components/Icon/components/{Done.js → Done.jsx} +0 -0
- /package/src/components/Icon/components/{DownArrow.js → DownArrow.jsx} +0 -0
- /package/src/components/Icon/components/{Download.js → Download.jsx} +0 -0
- /package/src/components/Icon/components/{Drag.js → Drag.jsx} +0 -0
- /package/src/components/Icon/components/{Duplicate.js → Duplicate.jsx} +0 -0
- /package/src/components/Icon/components/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/Icon/components/{Empty.js → Empty.jsx} +0 -0
- /package/src/components/Icon/components/{EmptyCheck.js → EmptyCheck.jsx} +0 -0
- /package/src/components/Icon/components/{Extend.js → Extend.jsx} +0 -0
- /package/src/components/Icon/components/{File.js → File.jsx} +0 -0
- /package/src/components/Icon/components/{Filter.js → Filter.jsx} +0 -0
- /package/src/components/Icon/components/{Form.js → Form.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowDown.js → FullArrowDown.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowLeft.js → FullArrowLeft.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowRight.js → FullArrowRight.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowUp.js → FullArrowUp.jsx} +0 -0
- /package/src/components/Icon/components/{Grid.js → Grid.jsx} +0 -0
- /package/src/components/Icon/components/{Grid2.js → Grid2.jsx} +0 -0
- /package/src/components/Icon/components/{GriddoLogo.js → GriddoLogo.jsx} +0 -0
- /package/src/components/Icon/components/{HeroCard.js → HeroCard.jsx} +0 -0
- /package/src/components/Icon/components/{Hide.js → Hide.jsx} +0 -0
- /package/src/components/Icon/components/{History.js → History.jsx} +0 -0
- /package/src/components/Icon/components/{Home.js → Home.jsx} +0 -0
- /package/src/components/Icon/components/{Ia.js → Ia.jsx} +0 -0
- /package/src/components/Icon/components/{Image.js → Image.jsx} +0 -0
- /package/src/components/Icon/components/{Info.js → Info.jsx} +0 -0
- /package/src/components/Icon/components/{Laptop.js → Laptop.jsx} +0 -0
- /package/src/components/Icon/components/{LeftArrow.js → LeftArrow.jsx} +0 -0
- /package/src/components/Icon/components/{Link.js → Link.jsx} +0 -0
- /package/src/components/Icon/components/{Lock.js → Lock.jsx} +0 -0
- /package/src/components/Icon/components/{Log.js → Log.jsx} +0 -0
- /package/src/components/Icon/components/{Map.js → Map.jsx} +0 -0
- /package/src/components/Icon/components/{Menu.js → Menu.jsx} +0 -0
- /package/src/components/Icon/components/{Microsoft.js → Microsoft.jsx} +0 -0
- /package/src/components/Icon/components/{Modified.js → Modified.jsx} +0 -0
- /package/src/components/Icon/components/{Modules.js → Modules.jsx} +0 -0
- /package/src/components/Icon/components/{More.js → More.jsx} +0 -0
- /package/src/components/Icon/components/{NewFolder.js → NewFolder.jsx} +0 -0
- /package/src/components/Icon/components/{Offline.js → Offline.jsx} +0 -0
- /package/src/components/Icon/components/{OfflinePending.js → OfflinePending.jsx} +0 -0
- /package/src/components/Icon/components/{OpenOutside.js → OpenOutside.jsx} +0 -0
- /package/src/components/Icon/components/{OpenPanel.js → OpenPanel.jsx} +0 -0
- /package/src/components/Icon/components/{OutOfSection.js → OutOfSection.jsx} +0 -0
- /package/src/components/Icon/components/{Page.js → Page.jsx} +0 -0
- /package/src/components/Icon/components/{Party.js → Party.jsx} +0 -0
- /package/src/components/Icon/components/{Paste.js → Paste.jsx} +0 -0
- /package/src/components/Icon/components/{Phone.js → Phone.jsx} +0 -0
- /package/src/components/Icon/components/{PhotoLibrary.js → PhotoLibrary.jsx} +0 -0
- /package/src/components/Icon/components/{Power.js → Power.jsx} +0 -0
- /package/src/components/Icon/components/{Preview.js → Preview.jsx} +0 -0
- /package/src/components/Icon/components/{Project.js → Project.jsx} +0 -0
- /package/src/components/Icon/components/{QrCode.js → QrCode.jsx} +0 -0
- /package/src/components/Icon/components/{Question.js → Question.jsx} +0 -0
- /package/src/components/Icon/components/{Refresh.js → Refresh.jsx} +0 -0
- /package/src/components/Icon/components/{Republish.js → Republish.jsx} +0 -0
- /package/src/components/Icon/components/{RightArrow.js → RightArrow.jsx} +0 -0
- /package/src/components/Icon/components/{Scheduled.js → Scheduled.jsx} +0 -0
- /package/src/components/Icon/components/{Search.js → Search.jsx} +0 -0
- /package/src/components/Icon/components/{SendEmail.js → SendEmail.jsx} +0 -0
- /package/src/components/Icon/components/{Settings.js → Settings.jsx} +0 -0
- /package/src/components/Icon/components/{Share.js → Share.jsx} +0 -0
- /package/src/components/Icon/components/{Subsection.js → Subsection.jsx} +0 -0
- /package/src/components/Icon/components/{Success.js → Success.jsx} +0 -0
- /package/src/components/Icon/components/{SuccessSolid.js → SuccessSolid.jsx} +0 -0
- /package/src/components/Icon/components/{Sync.js → Sync.jsx} +0 -0
- /package/src/components/Icon/components/{Tablet.js → Tablet.jsx} +0 -0
- /package/src/components/Icon/components/{Translate.js → Translate.jsx} +0 -0
- /package/src/components/Icon/components/{Unlink.js → Unlink.jsx} +0 -0
- /package/src/components/Icon/components/{UpArrow.js → UpArrow.jsx} +0 -0
- /package/src/components/Icon/components/{UploadFile.js → UploadFile.jsx} +0 -0
- /package/src/components/Icon/components/{UploadPending.js → UploadPending.jsx} +0 -0
- /package/src/components/Icon/components/{UrlLink.js → UrlLink.jsx} +0 -0
- /package/src/components/Icon/components/{User.js → User.jsx} +0 -0
- /package/src/components/Icon/components/{Users.js → Users.jsx} +0 -0
- /package/src/components/Icon/components/{Video.js → Video.jsx} +0 -0
- /package/src/components/Icon/components/{View.js → View.jsx} +0 -0
- /package/src/components/Icon/components/{Warning.js → Warning.jsx} +0 -0
- /package/src/components/Icon/components/{Web.js → Web.jsx} +0 -0
- /package/src/components/Icon/components/{Working.js → Working.jsx} +0 -0
- /package/src/components/Loader/components/{Circle.js → Circle.jsx} +0 -0
- /package/src/components/Loader/components/{Dots.js → Dots.jsx} +0 -0
- /package/src/components/Loader/components/{SmallCircle.js → SmallCircle.jsx} +0 -0
package/config/webpack.config.js
CHANGED
|
@@ -2,26 +2,23 @@ const fs = require("fs");
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const webpack = require("webpack");
|
|
4
4
|
const resolve = require("resolve");
|
|
5
|
-
const PnpWebpackPlugin = require("pnp-webpack-plugin");
|
|
6
5
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
7
6
|
const CaseSensitivePathsPlugin = require("case-sensitive-paths-webpack-plugin");
|
|
8
7
|
const InlineChunkHtmlPlugin = require("react-dev-utils/InlineChunkHtmlPlugin");
|
|
9
8
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
10
9
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const ManifestPlugin = require("webpack-manifest-plugin");
|
|
10
|
+
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
|
11
|
+
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
|
|
14
12
|
const InterpolateHtmlPlugin = require("react-dev-utils/InterpolateHtmlPlugin");
|
|
15
|
-
const WorkboxWebpackPlugin = require("workbox-webpack-plugin");
|
|
16
|
-
const WatchMissingNodeModulesPlugin = require("react-dev-utils/WatchMissingNodeModulesPlugin");
|
|
17
13
|
const getCSSModuleLocalIdent = require("react-dev-utils/getCSSModuleLocalIdent");
|
|
18
14
|
const paths = require("./paths");
|
|
19
15
|
const modules = require("./modules");
|
|
20
16
|
const getClientEnvironment = require("./env");
|
|
21
17
|
const ModuleNotFoundPlugin = require("react-dev-utils/ModuleNotFoundPlugin");
|
|
22
18
|
const ForkTsCheckerWebpackPlugin = require("react-dev-utils/ForkTsCheckerWebpackPlugin");
|
|
23
|
-
const typescriptFormatter = require("react-dev-utils/typescriptFormatter");
|
|
24
19
|
const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
|
|
20
|
+
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
|
|
21
|
+
const createEnvironmentHash = require("./webpack/persistentCache/createEnvironmentHash");
|
|
25
22
|
|
|
26
23
|
const postcssNormalize = require("postcss-normalize");
|
|
27
24
|
|
|
@@ -51,9 +48,6 @@ const appPackageJson = require(paths.appPackageJson);
|
|
|
51
48
|
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
|
52
49
|
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
|
|
53
50
|
|
|
54
|
-
const webpackDevClientEntry = require.resolve("react-dev-utils/webpackHotDevClient");
|
|
55
|
-
const reactRefreshOverlayEntry = require.resolve("react-dev-utils/refreshOverlayInterop");
|
|
56
|
-
|
|
57
51
|
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
|
|
58
52
|
// makes for a smoother build process.
|
|
59
53
|
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== "false";
|
|
@@ -63,8 +57,9 @@ const imageInlineSizeLimit = parseInt(process.env.IMAGE_INLINE_SIZE_LIMIT || "10
|
|
|
63
57
|
// Check if TypeScript is setup
|
|
64
58
|
const useTypeScript = fs.existsSync(paths.appTsConfig);
|
|
65
59
|
|
|
66
|
-
//
|
|
67
|
-
|
|
60
|
+
// CI runners are memory-capped containers with a throwaway filesystem, so webpack 5
|
|
61
|
+
// defaults that assume a long-lived dev machine work against us there.
|
|
62
|
+
const isCI = process.env.CI === "true";
|
|
68
63
|
|
|
69
64
|
// style files regexes
|
|
70
65
|
const cssRegex = /\.css$/;
|
|
@@ -115,7 +110,9 @@ module.exports = function (webpackEnv) {
|
|
|
115
110
|
},
|
|
116
111
|
{
|
|
117
112
|
loader: require.resolve("css-loader"),
|
|
118
|
-
options:
|
|
113
|
+
options: {
|
|
114
|
+
...cssOptions,
|
|
115
|
+
},
|
|
119
116
|
},
|
|
120
117
|
{
|
|
121
118
|
// Options for PostCSS as we reference these options twice
|
|
@@ -123,26 +120,23 @@ module.exports = function (webpackEnv) {
|
|
|
123
120
|
// package.json
|
|
124
121
|
loader: require.resolve("postcss-loader"),
|
|
125
122
|
options: {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
// which in turn let's users customize the target behavior as per their needs.
|
|
144
|
-
postcssNormalize(),
|
|
145
|
-
],
|
|
123
|
+
postcssOptions: {
|
|
124
|
+
plugins: [
|
|
125
|
+
require("postcss-flexbugs-fixes"),
|
|
126
|
+
require("postcss-preset-env")({
|
|
127
|
+
autoprefixer: {
|
|
128
|
+
flexbox: "no-2009",
|
|
129
|
+
},
|
|
130
|
+
stage: 3,
|
|
131
|
+
}),
|
|
132
|
+
// PostCSS plugins from components.
|
|
133
|
+
...postcssConfigPlugins,
|
|
134
|
+
// Adds PostCSS Normalize as the reset css with default options,
|
|
135
|
+
// so that it honors browserslist config in package.json.
|
|
136
|
+
// postcss-preset-env 6 does not bundle normalize, so we keep it.
|
|
137
|
+
postcssNormalize(),
|
|
138
|
+
],
|
|
139
|
+
},
|
|
146
140
|
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
147
141
|
},
|
|
148
142
|
},
|
|
@@ -160,7 +154,8 @@ module.exports = function (webpackEnv) {
|
|
|
160
154
|
{
|
|
161
155
|
loader: require.resolve(preProcessor),
|
|
162
156
|
options: {
|
|
163
|
-
|
|
157
|
+
api: "modern-compiler",
|
|
158
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
164
159
|
...preProcessorOptions,
|
|
165
160
|
},
|
|
166
161
|
},
|
|
@@ -171,6 +166,11 @@ module.exports = function (webpackEnv) {
|
|
|
171
166
|
|
|
172
167
|
return {
|
|
173
168
|
mode: isEnvProduction ? "production" : isEnvDevelopment && "development",
|
|
169
|
+
// Pin the target instead of letting webpack 5 derive it from the client
|
|
170
|
+
// project's browserslist: queries like "maintained node versions" (common
|
|
171
|
+
// in Gatsby-rendered projects) drop the `document` capability and switch
|
|
172
|
+
// chunks to ESM format, which breaks the editor's classic script tags.
|
|
173
|
+
target: ["web", "es2017"],
|
|
174
174
|
// Stop compilation early in production
|
|
175
175
|
bail: isEnvProduction,
|
|
176
176
|
devtool: isEnvProduction
|
|
@@ -180,31 +180,7 @@ module.exports = function (webpackEnv) {
|
|
|
180
180
|
: isEnvDevelopment && "cheap-module-source-map",
|
|
181
181
|
// These are the "entry points" to our application.
|
|
182
182
|
// This means they will be the "root" imports that are included in JS bundle.
|
|
183
|
-
entry:
|
|
184
|
-
isEnvDevelopment && !shouldUseReactRefresh
|
|
185
|
-
? [
|
|
186
|
-
// Include an alternative client for WebpackDevServer. A client's job is to
|
|
187
|
-
// connect to WebpackDevServer by a socket and get notified about changes.
|
|
188
|
-
// When you save a file, the client will either apply hot updates (in case
|
|
189
|
-
// of CSS changes), or refresh the page (in case of JS changes). When you
|
|
190
|
-
// make a syntax error, this client will display a syntax error overlay.
|
|
191
|
-
// Note: instead of the default WebpackDevServer client, we use a custom one
|
|
192
|
-
// to bring better experience for Create React App users. You can replace
|
|
193
|
-
// the line below with these two lines if you prefer the stock client:
|
|
194
|
-
//
|
|
195
|
-
// require.resolve('webpack-dev-server/client') + '?/',
|
|
196
|
-
// require.resolve('webpack/hot/dev-server'),
|
|
197
|
-
//
|
|
198
|
-
// When using the experimental react-refresh integration,
|
|
199
|
-
// the webpack plugin takes care of injecting the dev client for us.
|
|
200
|
-
webpackDevClientEntry,
|
|
201
|
-
// Finally, this is your app's code:
|
|
202
|
-
paths.appIndexJs,
|
|
203
|
-
// We include the app code last so that if there is a runtime error during
|
|
204
|
-
// initialization, it doesn't blow up the WebpackDevServer client, and
|
|
205
|
-
// changing JS code would still trigger a refresh.
|
|
206
|
-
]
|
|
207
|
-
: paths.appIndexJs,
|
|
183
|
+
entry: paths.appIndexJs,
|
|
208
184
|
output: {
|
|
209
185
|
// The build folder.
|
|
210
186
|
path: isEnvProduction ? paths.appBuild : undefined,
|
|
@@ -212,13 +188,12 @@ module.exports = function (webpackEnv) {
|
|
|
212
188
|
pathinfo: isEnvDevelopment,
|
|
213
189
|
// There will be one main bundle, and one file per asynchronous chunk.
|
|
214
190
|
// In development, it does not produce real files.
|
|
215
|
-
filename: isEnvProduction ? "static/js/[name].[contenthash:8].js" : isEnvDevelopment && "static/js/
|
|
216
|
-
// TODO: remove this when upgrading to webpack 5
|
|
217
|
-
futureEmitAssets: true,
|
|
191
|
+
filename: isEnvProduction ? "static/js/[name].[contenthash:8].js" : isEnvDevelopment && "static/js/[name].js",
|
|
218
192
|
// There are also additional JS chunk files if you use code splitting.
|
|
219
193
|
chunkFilename: isEnvProduction
|
|
220
194
|
? "static/js/[name].[contenthash:8].chunk.js"
|
|
221
195
|
: isEnvDevelopment && "static/js/[name].chunk.js",
|
|
196
|
+
assetModuleFilename: "static/media/[name].[contenthash:8][ext]",
|
|
222
197
|
// webpack uses `publicPath` to determine where the app is being served from.
|
|
223
198
|
// It requires a trailing slash, or the file assets will get an incorrect path.
|
|
224
199
|
// We inferred the "public path" (such as / or /my-project) from homepage.
|
|
@@ -229,16 +204,40 @@ module.exports = function (webpackEnv) {
|
|
|
229
204
|
: isEnvDevelopment && ((info) => path.resolve(info.absoluteResourcePath).replace(/\\/g, "/")),
|
|
230
205
|
// Prevents conflicts when multiple webpack runtimes (from different apps)
|
|
231
206
|
// are used on the same page.
|
|
232
|
-
|
|
207
|
+
chunkLoadingGlobal: `webpackJsonp${appPackageJson.name}`,
|
|
233
208
|
// this defaults to 'window', but by setting it to 'this' then
|
|
234
209
|
// module chunks which are built will work in web workers as well.
|
|
235
210
|
globalObject: "this",
|
|
211
|
+
// Node.js 17+ (OpenSSL 3.0) dropped MD4, webpack 5's default hash function.
|
|
212
|
+
// xxhash64 avoids the `digital envelope routines::unsupported` error and lets
|
|
213
|
+
// us drop the `--openssl-legacy-provider` workaround.
|
|
214
|
+
hashFunction: "xxhash64",
|
|
236
215
|
},
|
|
216
|
+
// The persistent cache pays off on a dev machine, but CI installs node_modules
|
|
217
|
+
// from scratch on every run: the ~640 MB pack is built, held in memory to be
|
|
218
|
+
// serialized and then thrown away, for zero reuse.
|
|
219
|
+
cache: isCI
|
|
220
|
+
? false
|
|
221
|
+
: {
|
|
222
|
+
type: "filesystem",
|
|
223
|
+
version: createEnvironmentHash(env.raw),
|
|
224
|
+
cacheDirectory: paths.appWebpackCache,
|
|
225
|
+
store: "pack",
|
|
226
|
+
buildDependencies: {
|
|
227
|
+
defaultWebpack: ["webpack/lib/"],
|
|
228
|
+
config: [__filename],
|
|
229
|
+
tsconfig: [paths.appTsConfig].filter(Boolean),
|
|
230
|
+
},
|
|
231
|
+
},
|
|
237
232
|
optimization: {
|
|
238
233
|
minimize: isEnvProduction,
|
|
239
234
|
minimizer: [
|
|
240
235
|
// This is only used in production mode
|
|
241
236
|
new TerserPlugin({
|
|
237
|
+
// Inside a container os.cpus() reports the host's cores, so the default
|
|
238
|
+
// (cores - 1) forks far more workers than the pod can feed, each one a
|
|
239
|
+
// Node process inheriting NODE_OPTIONS' heap ceiling.
|
|
240
|
+
parallel: isCI ? 2 : true,
|
|
242
241
|
terserOptions: {
|
|
243
242
|
parse: {
|
|
244
243
|
// We want terser to parse ecma 8 code. However, we don't want it
|
|
@@ -276,34 +275,15 @@ module.exports = function (webpackEnv) {
|
|
|
276
275
|
ascii_only: true,
|
|
277
276
|
},
|
|
278
277
|
},
|
|
279
|
-
sourceMap: shouldUseSourceMap,
|
|
280
278
|
}),
|
|
281
279
|
// This is only used in production mode
|
|
282
|
-
new
|
|
283
|
-
cssProcessorOptions: {
|
|
284
|
-
parser: safePostCssParser,
|
|
285
|
-
map: shouldUseSourceMap
|
|
286
|
-
? {
|
|
287
|
-
// `inline: false` forces the sourcemap to be output into a
|
|
288
|
-
// separate file
|
|
289
|
-
inline: false,
|
|
290
|
-
// `annotation: true` appends the sourceMappingURL to the end of
|
|
291
|
-
// the css file, helping the browser find the sourcemap
|
|
292
|
-
annotation: true,
|
|
293
|
-
}
|
|
294
|
-
: false,
|
|
295
|
-
},
|
|
296
|
-
cssProcessorPluginOptions: {
|
|
297
|
-
preset: ["default", { minifyFontValues: { removeQuotes: false } }],
|
|
298
|
-
},
|
|
299
|
-
}),
|
|
280
|
+
new CssMinimizerPlugin(),
|
|
300
281
|
],
|
|
301
282
|
// Automatically split vendor and commons
|
|
302
283
|
// https://twitter.com/wSokra/status/969633336732905474
|
|
303
284
|
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
|
|
304
285
|
splitChunks: {
|
|
305
286
|
chunks: "all",
|
|
306
|
-
name: isEnvDevelopment,
|
|
307
287
|
},
|
|
308
288
|
// Keep the runtime chunk separated to enable long term caching
|
|
309
289
|
// https://twitter.com/wSokra/status/969679223278505985
|
|
@@ -339,49 +319,60 @@ module.exports = function (webpackEnv) {
|
|
|
339
319
|
...(modules.webpackAliases || {}),
|
|
340
320
|
...projectAliases,
|
|
341
321
|
},
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
322
|
+
// Stub Node builtins that have no browser equivalent (webpack 4 mocked these via
|
|
323
|
+
// its old core-module block: module, dgram, dns, fs, http2, net, tls, child_process).
|
|
324
|
+
// Everything with a browser polyfill (buffer, stream, crypto, http, https, zlib,
|
|
325
|
+
// util, process, ...) is provided by NodePolyfillPlugin, restoring webpack 4's
|
|
326
|
+
// auto-polyfill behaviour so legacy client instances keep building.
|
|
327
|
+
fallback: {
|
|
328
|
+
fs: false,
|
|
329
|
+
net: false,
|
|
330
|
+
tls: false,
|
|
331
|
+
child_process: false,
|
|
332
|
+
dns: false,
|
|
333
|
+
http2: false,
|
|
334
|
+
module: false,
|
|
335
|
+
dgram: false,
|
|
336
|
+
},
|
|
354
337
|
},
|
|
355
338
|
module: {
|
|
356
|
-
|
|
339
|
+
// Missing exports must stay non-blocking: webpack 4's CJS css-loader
|
|
340
|
+
// never validated CSS-module classes, so client projects accumulated
|
|
341
|
+
// references to classes that don't exist. With webpack 5 named exports
|
|
342
|
+
// those would all become compile errors and block adoption.
|
|
343
|
+
parser: {
|
|
344
|
+
javascript: {
|
|
345
|
+
exportsPresence: "warn",
|
|
346
|
+
},
|
|
347
|
+
},
|
|
357
348
|
rules: [
|
|
358
|
-
// Disable require.ensure as it's not a standard language feature.
|
|
359
|
-
{ parser: { requireEnsure: false } },
|
|
360
349
|
{
|
|
361
350
|
// "oneOf" will traverse all following loaders until one will
|
|
362
351
|
// match the requirements. When no loader matches it will fall
|
|
363
|
-
// back to the "
|
|
352
|
+
// back to the "resource" asset module at the end of the loader list.
|
|
364
353
|
oneOf: [
|
|
365
354
|
// TODO: Merge this config once `image/avif` is in the mime-db
|
|
366
355
|
// https://github.com/jshttp/mime-db
|
|
367
356
|
{
|
|
368
357
|
test: [/\.avif$/],
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
358
|
+
type: "asset",
|
|
359
|
+
mimetype: "image/avif",
|
|
360
|
+
parser: {
|
|
361
|
+
dataUrlCondition: {
|
|
362
|
+
maxSize: imageInlineSizeLimit,
|
|
363
|
+
},
|
|
374
364
|
},
|
|
375
365
|
},
|
|
376
|
-
// "
|
|
366
|
+
// "asset" loader works like "file" loader except that it embeds assets
|
|
377
367
|
// smaller than specified limit in bytes as data URLs to avoid requests.
|
|
378
368
|
// A missing `test` is equivalent to a match.
|
|
379
369
|
{
|
|
380
370
|
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
371
|
+
type: "asset",
|
|
372
|
+
parser: {
|
|
373
|
+
dataUrlCondition: {
|
|
374
|
+
maxSize: imageInlineSizeLimit,
|
|
375
|
+
},
|
|
385
376
|
},
|
|
386
377
|
},
|
|
387
378
|
// Process application JS with Babel.
|
|
@@ -475,6 +466,17 @@ module.exports = function (webpackEnv) {
|
|
|
475
466
|
importLoaders: 1,
|
|
476
467
|
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
477
468
|
modules: {
|
|
469
|
+
// css-loader v6 defaults `esModule: true`, so `import * as styles`
|
|
470
|
+
// only sees locals as named exports when `namedExport` is on.
|
|
471
|
+
// griddo-components relies on `import * as styles` heavily.
|
|
472
|
+
namedExport: true,
|
|
473
|
+
// `asIs` keeps the webpack 4 class names, so `styles["heading-sm"]`
|
|
474
|
+
// keeps working in client projects. css-loader derives
|
|
475
|
+
// `useExportsAs` from this value and emits
|
|
476
|
+
// `export { _1 as "heading-sm" }` instead of the invalid
|
|
477
|
+
// `export var heading-sm`. camelCaseOnly is what we must avoid:
|
|
478
|
+
// it would turn `@keyframes _in` into `export var in` (reserved word).
|
|
479
|
+
exportLocalsConvention: "asIs",
|
|
478
480
|
getLocalIdent: getCSSModuleLocalIdent,
|
|
479
481
|
},
|
|
480
482
|
}),
|
|
@@ -507,6 +509,8 @@ module.exports = function (webpackEnv) {
|
|
|
507
509
|
importLoaders: 3,
|
|
508
510
|
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
509
511
|
modules: {
|
|
512
|
+
namedExport: true,
|
|
513
|
+
exportLocalsConvention: "asIs",
|
|
510
514
|
getLocalIdent: getCSSModuleLocalIdent,
|
|
511
515
|
},
|
|
512
516
|
},
|
|
@@ -515,30 +519,20 @@ module.exports = function (webpackEnv) {
|
|
|
515
519
|
},
|
|
516
520
|
{
|
|
517
521
|
test: /\.(woff|woff2)$/,
|
|
518
|
-
|
|
522
|
+
type: "asset/resource",
|
|
519
523
|
},
|
|
520
524
|
{
|
|
521
525
|
test: /\.svg$/,
|
|
522
526
|
use: ["@svgr/webpack"],
|
|
523
527
|
},
|
|
524
|
-
//
|
|
525
|
-
//
|
|
526
|
-
// In production, they would get copied to the `build` folder.
|
|
527
|
-
// This loader doesn't use a "test" so it will catch all modules
|
|
528
|
-
// that fall through the other loaders.
|
|
528
|
+
// Catch-all: anything not handled above is emitted as a separate file.
|
|
529
|
+
// This replaces the old file-loader catch-all.
|
|
529
530
|
{
|
|
530
|
-
loader: require.resolve("file-loader"),
|
|
531
|
-
// Exclude `js` files to keep "css" loader working as it injects
|
|
532
|
-
// its runtime that would otherwise be processed through "file" loader.
|
|
533
|
-
// Also exclude `html` and `json` extensions so they get processed
|
|
534
|
-
// by webpacks internal loaders.
|
|
535
531
|
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
|
|
536
|
-
|
|
537
|
-
name: "static/media/[name].[hash:8].[ext]",
|
|
538
|
-
},
|
|
532
|
+
type: "asset/resource",
|
|
539
533
|
},
|
|
540
534
|
// ** STOP ** Are you adding a new loader?
|
|
541
|
-
// Make sure to add the new loader(s) before the "
|
|
535
|
+
// Make sure to add the new loader(s) before the "asset/resource" catch-all.
|
|
542
536
|
],
|
|
543
537
|
},
|
|
544
538
|
{
|
|
@@ -549,6 +543,12 @@ module.exports = function (webpackEnv) {
|
|
|
549
543
|
],
|
|
550
544
|
},
|
|
551
545
|
plugins: [
|
|
546
|
+
// Restore webpack 4's Node core-module handling for browser bundles. Clients run
|
|
547
|
+
// `griddo build` (this config) against their own instance, so this guards legacy
|
|
548
|
+
// instances against "Module not found" for Node builtins that webpack 5 no longer
|
|
549
|
+
// polyfills automatically. Browser-polyfillable builtins are provided here; the
|
|
550
|
+
// server-only ones are stubbed via resolve.fallback above.
|
|
551
|
+
new NodePolyfillPlugin(),
|
|
552
552
|
// Generates an `index.html` file with the <script> injected.
|
|
553
553
|
new HtmlWebpackPlugin(
|
|
554
554
|
Object.assign(
|
|
@@ -594,32 +594,23 @@ module.exports = function (webpackEnv) {
|
|
|
594
594
|
// during a production build.
|
|
595
595
|
// Otherwise React will be compiled in the very slow development mode.
|
|
596
596
|
new webpack.DefinePlugin(env.stringified),
|
|
597
|
-
//
|
|
598
|
-
|
|
599
|
-
//
|
|
597
|
+
// HMR is handled by WebpackDevServer 4 (`hot: true` in webpackDevServer.config.js),
|
|
598
|
+
// which registers HotModuleReplacementPlugin automatically. We no longer add it
|
|
599
|
+
// manually to avoid a duplicate-plugin instance.
|
|
600
|
+
// Experimental hot reloading for React (Fast Refresh).
|
|
600
601
|
// https://github.com/facebook/react/tree/master/packages/react-refresh
|
|
601
602
|
isEnvDevelopment &&
|
|
602
603
|
shouldUseReactRefresh &&
|
|
603
604
|
new ReactRefreshWebpackPlugin({
|
|
604
|
-
overlay
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
module: reactRefreshOverlayEntry,
|
|
609
|
-
// Since we ship a custom dev client and overlay integration,
|
|
610
|
-
// the bundled socket handling logic can be eliminated.
|
|
611
|
-
sockIntegration: false,
|
|
612
|
-
},
|
|
605
|
+
// The error overlay is served by WebpackDevServer 4's native client
|
|
606
|
+
// (see `client.overlay` in webpackDevServer.config.js). Disable the
|
|
607
|
+
// Fast Refresh plugin overlay to avoid two overlays fighting.
|
|
608
|
+
overlay: false,
|
|
613
609
|
}),
|
|
614
610
|
// Watcher doesn't work well if you mistype casing in a path so we use
|
|
615
611
|
// a plugin that prints an error when you attempt to do this.
|
|
616
612
|
// See https://github.com/facebook/create-react-app/issues/240
|
|
617
613
|
isEnvDevelopment && new CaseSensitivePathsPlugin(),
|
|
618
|
-
// If you require a missing module and then `npm install` it, you still have
|
|
619
|
-
// to restart the development server for webpack to discover it. This plugin
|
|
620
|
-
// makes the discovery automatic so you don't have to restart.
|
|
621
|
-
// See https://github.com/facebook/create-react-app/issues/186
|
|
622
|
-
isEnvDevelopment && new WatchMissingNodeModulesPlugin(paths.appNodeModules),
|
|
623
614
|
isEnvProduction &&
|
|
624
615
|
new MiniCssExtractPlugin({
|
|
625
616
|
// Options similar to the same options in webpackOptions.output
|
|
@@ -633,7 +624,7 @@ module.exports = function (webpackEnv) {
|
|
|
633
624
|
// `index.html`
|
|
634
625
|
// - "entrypoints" key: Array of files which are included in `index.html`,
|
|
635
626
|
// can be used to reconstruct the HTML if necessary
|
|
636
|
-
new
|
|
627
|
+
new WebpackManifestPlugin({
|
|
637
628
|
fileName: "asset-manifest.json",
|
|
638
629
|
publicPath: paths.publicUrlOrPath,
|
|
639
630
|
generate: (seed, files, entrypoints) => {
|
|
@@ -654,59 +645,62 @@ module.exports = function (webpackEnv) {
|
|
|
654
645
|
// solution that requires the user to opt into importing specific locales.
|
|
655
646
|
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
|
656
647
|
// You can remove this if you don't use Moment.js:
|
|
657
|
-
new webpack.IgnorePlugin(
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
fs.existsSync(swSrc) &&
|
|
662
|
-
new WorkboxWebpackPlugin.InjectManifest({
|
|
663
|
-
swSrc,
|
|
664
|
-
dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
|
|
665
|
-
exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/],
|
|
666
|
-
// Bump up the default maximum size (2mb) that's precached,
|
|
667
|
-
// to make lazy-loading failure scenarios less likely.
|
|
668
|
-
// See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
|
|
669
|
-
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
|
|
670
|
-
}),
|
|
648
|
+
new webpack.IgnorePlugin({
|
|
649
|
+
resourceRegExp: /^\.\/locale$/,
|
|
650
|
+
contextRegExp: /moment$/,
|
|
651
|
+
}),
|
|
671
652
|
// TypeScript type checking
|
|
672
653
|
useTypeScript &&
|
|
673
654
|
new ForkTsCheckerWebpackPlugin({
|
|
674
|
-
typescript: resolve.sync("typescript", {
|
|
675
|
-
basedir: paths.appNodeModules,
|
|
676
|
-
}),
|
|
677
655
|
async: isEnvDevelopment,
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
//
|
|
684
|
-
//
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
656
|
+
typescript: {
|
|
657
|
+
typescriptPath: resolve.sync("typescript", {
|
|
658
|
+
basedir: paths.appNodeModules,
|
|
659
|
+
}),
|
|
660
|
+
// Must be an absolute path: fork-ts-checker v6 resolves a relative
|
|
661
|
+
// "tsconfig.json" against the webpack compiler context (the client
|
|
662
|
+
// project cwd), which would pick up the client's tsconfig instead.
|
|
663
|
+
configFile: paths.appTsConfig,
|
|
664
|
+
configOverwrite: {
|
|
665
|
+
compilerOptions: {
|
|
666
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
667
|
+
skipLibCheck: true,
|
|
668
|
+
inlineSourceMap: false,
|
|
669
|
+
declarationMap: false,
|
|
670
|
+
noEmit: true,
|
|
671
|
+
incremental: true,
|
|
672
|
+
tsBuildInfoFile: paths.appTsBuildInfoFile,
|
|
673
|
+
},
|
|
674
|
+
},
|
|
675
|
+
context: paths.appPath,
|
|
676
|
+
diagnosticOptions: {
|
|
677
|
+
syntactic: true,
|
|
678
|
+
},
|
|
679
|
+
mode: "write-references",
|
|
680
|
+
},
|
|
681
|
+
issue: {
|
|
682
|
+
include: [{ file: "../**/src/**/*.{ts,tsx}" }, { file: "**/src/**/*.{ts,tsx}" }],
|
|
683
|
+
exclude: [
|
|
684
|
+
{ file: "**/src/**/__tests__/**" },
|
|
685
|
+
{ file: "**/src/**/?(*.)(spec|test).*" },
|
|
686
|
+
{ file: "**/src/setupProxy.*" },
|
|
687
|
+
{ file: "**/src/setupTests.*" },
|
|
688
|
+
],
|
|
689
|
+
},
|
|
690
|
+
logger: {
|
|
691
|
+
infrastructure: "silent",
|
|
692
|
+
// Progress lines ("Files successfully emitted…", "No issues
|
|
693
|
+
// found."). Actual TS errors still reach webpack's compilation
|
|
694
|
+
// and are printed by react-dev-utils.
|
|
695
|
+
issues: "silent",
|
|
696
|
+
},
|
|
697
697
|
}),
|
|
698
698
|
].filter(Boolean),
|
|
699
|
-
//
|
|
700
|
-
//
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
dns: "mock",
|
|
705
|
-
fs: "empty",
|
|
706
|
-
http2: "empty",
|
|
707
|
-
net: "empty",
|
|
708
|
-
tls: "empty",
|
|
709
|
-
child_process: "empty",
|
|
699
|
+
// Silence webpack-dev-middleware's stats dump on every (re)build —
|
|
700
|
+
// webpack 4's dev server did this via `quiet: true`. react-dev-utils
|
|
701
|
+
// still prints the friendly "Compiled successfully" + URLs block.
|
|
702
|
+
infrastructureLogging: {
|
|
703
|
+
level: "none",
|
|
710
704
|
},
|
|
711
705
|
// Turn off performance processing because we utilize
|
|
712
706
|
// our own hints via the FileSizeReporter
|