问题
I packed material-ui from material-ui/index.js
into material-ui.js for serving it externally.
The import statements are like
import FlatButton from 'material-ui/FlatButton';
How should webpack be configured to exclude material-ui as external dependency?\ I believe changing imports as this would help in externalizing but have no idea how to deal with material-ui thereafter.
import material-ui from 'material-ui'
来源:https://stackoverflow.com/questions/37102609/how-should-material-ui-be-externalized-when-bundling-with-webpack