react-component / tooltip

React Tooltip
http://react-component.github.io/tooltip/
MIT License
924 stars 188 forks source link

Webpack5 ESM strict mode #226

Open ValeryLosik opened 3 years ago

ValeryLosik commented 3 years ago

Good explanation can be found here https://github.com/babel/babel/issues/12058#issue-700745148 In general, all imports should have extensions. Thanks

tonoslav commented 3 years ago

@ValeryLosik any solution?

ldttmt commented 3 years ago

Any workaround for this?

canopus1io commented 1 year ago

BUMP

If I understand this correctly,

  1. rc-tooltip bundles @babel/runtime^7.11.2 which will not build on webpack 5 (due to ESM strict mode)
  2. @babel/runtime@7.12 resolves this issue as stated here
  3. rc-motion has updated their babel runtime requirement to @babel/runtime^7.11 (https://github.com/react-component/motion/issues/14)

why was rc-tooltip not updated? is there a workaround that I'm not aware of?

yoyo837 commented 1 year ago
ant-design % npm ls @babel/runtime
antd@5.1.7 /Users/tanghui/git/github/ant-design
├─┬ @ant-design/cssinjs@1.5.6
│ └── @babel/runtime@7.20.13 deduped
├─┬ @ant-design/icons@5.0.1
│ └── @babel/runtime@7.20.13 deduped
├─┬ @ant-design/react-slick@1.0.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ @ant-design/tools@17.0.0
│ └─┬ @babel/preset-env@7.20.2
│   └─┬ @babel/plugin-transform-regenerator@7.20.5
│     └─┬ regenerator-transform@0.15.1
│       └── @babel/runtime@7.20.13 deduped
├── @babel/runtime@7.20.13
├─┬ @emotion/babel-preset-css-prop@11.10.0
│ ├── @babel/runtime@7.20.13 deduped
│ └─┬ @emotion/babel-plugin@11.10.5
│   ├── @babel/runtime@7.20.13 deduped
│   └─┬ babel-plugin-macros@3.1.0
│     └── @babel/runtime@7.20.13 deduped
├─┬ @emotion/react@11.10.5
│ └── @babel/runtime@7.20.13 deduped
├─┬ @rc-component/mutate-observer@1.0.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ @rc-component/tour@1.1.0
│ ├── @babel/runtime@7.20.13 deduped
│ └─┬ @rc-component/portal@1.1.0
│   └── @babel/runtime@7.20.13 deduped
├─┬ @testing-library/dom@8.20.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ @testing-library/jest-dom@5.16.5
│ └── @babel/runtime@7.20.13 deduped
├─┬ @testing-library/react@13.4.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ antd-img-crop@4.6.0
│ └─┬ antd@5.1.7
│   ├── @babel/runtime@7.20.13 deduped
│   └─┬ rc-collapse@3.4.2
│     └── @babel/runtime@7.20.13 deduped
├─┬ antd-token-previewer@1.1.0-22
│ ├─┬ @ant-design/icons@4.8.0
│ │ └── @babel/runtime@7.20.13 deduped
│ └── @babel/runtime@7.20.13 deduped
├─┬ dumi@2.1.7
│ ├─┬ react-error-boundary@3.1.4
│ │ └── @babel/runtime@7.20.13 deduped
│ └─┬ umi@4.0.48
│   ├── @babel/runtime@7.20.7
│   ├─┬ @umijs/bundler-webpack@4.0.48
│   │ └─┬ @umijs/babel-preset-umi@4.0.48
│   │   └── @babel/runtime@7.20.7
│   ├─┬ @umijs/preset-umi@4.0.48
│   │ └─┬ @umijs/history@5.3.1
│   │   └── @babel/runtime@7.20.13 deduped
│   └─┬ @umijs/renderer-react@4.0.48
│     ├── @babel/runtime@7.20.7
│     ├─┬ @loadable/component@5.15.2
│     │ └── @babel/runtime@7.20.13 deduped
│     ├─┬ history@5.3.0
│     │ └── @babel/runtime@7.20.13 deduped
│     └─┬ react-helmet-async@1.3.0
│       └── @babel/runtime@7.20.13 deduped
├─┬ eslint-plugin-jsx-a11y@6.7.1
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-cascader@3.8.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-checkbox@2.3.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-collapse@3.5.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-dialog@9.0.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-drawer@6.1.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-dropdown@4.0.1
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-field-form@1.27.3
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-footer@0.6.8
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-image@5.13.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-input-number@7.4.0
│ ├── @babel/runtime@7.20.13 deduped
│ └─┬ @rc-component/mini-decimal@1.0.1
│   └── @babel/runtime@7.20.13 deduped
├─┬ rc-input@0.1.4
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-mentions@1.13.1
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-menu@9.8.2
│ ├── @babel/runtime@7.20.13 deduped
│ └─┬ rc-overflow@1.2.8
│   └── @babel/runtime@7.20.13 deduped
├─┬ rc-motion@2.6.3
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-notification@5.0.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-pagination@3.2.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-picker@3.1.4
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-progress@3.4.1
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-rate@2.9.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-resize-observer@1.2.1
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-segmented@2.1.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-select@14.2.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-slider@10.0.1
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-steps@6.0.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-switch@4.0.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-table@7.30.3
│ ├── @babel/runtime@7.20.13 deduped
│ └─┬ @rc-component/context@1.3.0
│   └── @babel/runtime@7.20.13 deduped
├─┬ rc-tabs@12.5.6
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-textarea@0.4.7
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-tooltip@5.2.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-tree-select@5.6.0
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-tree@5.7.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-trigger@5.3.4
│ ├── @babel/runtime@7.20.13 deduped
│ └─┬ rc-align@4.0.15
│   └── @babel/runtime@7.20.13 deduped
├─┬ rc-tween-one@3.0.6
│ ├── @babel/runtime@7.20.13 deduped
│ └─┬ tween-one@1.2.2
│   └── @babel/runtime@7.20.13 deduped
├─┬ rc-upload@4.3.4
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-util@5.27.2
│ └── @babel/runtime@7.20.13 deduped
├─┬ rc-virtual-list@3.4.13
│ └── @babel/runtime@7.20.13 deduped
├─┬ react-dnd-html5-backend@16.0.1
│ └─┬ dnd-core@16.0.1
│   └─┬ redux@4.2.1
│     └── @babel/runtime@7.20.13 deduped
└─┬ react-window@1.8.8
  └── @babel/runtime@7.20.13 deduped

Effect after clean installation.