Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve dependency './factoryWithThrowingShims' #99

Closed
ghost opened this issue Jan 12, 2018 · 8 comments
Closed

Cannot resolve dependency './factoryWithThrowingShims' #99

ghost opened this issue Jan 12, 2018 · 8 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 12, 2018

node_modules/bizcharts/umd/BizCharts.js:328:27: Cannot resolve dependency './factoryWithThrowingShims'

@ghost ghost changed the title factoryWithThrowingShims 整个项目里面都找不到这个文件 Cannot resolve dependency './factoryWithThrowingShims' Jan 12, 2018
@ghost ghost closed this as completed Jan 12, 2018
@kiangtengl
Copy link
Contributor

How did you resolve this?

@ghost ghost reopened this Jan 12, 2018
@ghost
Copy link
Author

ghost commented Jan 12, 2018

I haven't resolved this. I am not quite sure about this so I closed it.

@ghost ghost closed this as completed Jan 12, 2018
@ghost
Copy link
Author

ghost commented Jan 12, 2018

According to https://webpack.js.org/configuration/externals/ , prop-types should be added in webpack.config.js

externals: {
    react: {
      root: 'React',
      commonjs2: 'react',
      commonjs: 'react',
      amd: 'react',
    },
    'prop-types': {
      root: 'PropTypes',
      commonjs2: 'prop-types',
      commonjs: 'prop-types',
      amd: 'prop-types',
    }
  },

�I tried locally and it works as expected.

@ghost ghost reopened this Jan 12, 2018
@weepy3641
Copy link
Member

weepy3641 commented Jan 12, 2018

@imdragonet
bizcharts build prop-types in its packages。
so you means prop-types should not be packed in bizcharts and use prop-types externals?

@ghost
Copy link
Author

ghost commented Feb 28, 2018

Yes, as described in webpack's documentation, you should not package prop-types into your bundle, cause bizCharts is a library.

FYI: https://github.com/prescottprue/react-redux-firebase/blob/master/webpack.config.js

@weepy3641
Copy link
Member

weepy3641 commented Feb 28, 2018

@imdragonet
Ok, Thanks。
Bizcharts will use prop-types as external lib in the next version 。

@weepy3641 weepy3641 added the plan label Mar 2, 2018
@weepy3641
Copy link
Member

fix at 3.1.3

@weepy3641
Copy link
Member

Based on user feedback,some users need bizcharts use prop-type as external lib.
So after 3.1.4-beta.1, bizcharts umd package will use prop-type as external lib. And es6、lib、src will not use prop-type as external lib.
You use bizcharts like

import BizCharts form 'bizcharts/lib'
import BizCharts form 'bizcharts/es6'
import BizCharts form 'bizcharts/src'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants