How should material-ui be externalized when bundling with webpack

大城市里の小女人 提交于 2019-12-10 19:14:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!