javascript - How does material-ui implement the introduction of a single component?
黄舟
黄舟 2017-05-31 10:40:08
0
1
518

Material-ui can directly introduce the entire library, but sometimes only the required components, such as AppBar, are introduced in order to reduce the size of js.

import AppBar from 'material-ui/AppBar';

In this way, only the AppBar component will be introduced, and the entire material-ui will not be introduced, thus reducing the size of the packaged js.
My question ismaininpackage.jsonspecifies the entry file for each package. In this case, how is the introduction of a single component implemented, that is,material -How is the bar in ui/AppBarimplemented?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all (1)
小葫芦

In fact, by default, you first go to the root directorynode_modules/material-ui/AppBar
You will know after you go tonode_modules/material-uiand take a look

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!