A demonstration of CSS file import from node_modules
into a TS module via
webpack. The CSS file is consumed in a web component and scoped to its shadow
DOM.
- Install npm
git clone
andcd
therenpm install
npm run build
- Load the
dist/index.html
file in your browser
โ KNOWN ISSUE
Thenpm run build
will result in error the first time, because thenode_modules/leaflet/dist/leaflet.css.d.ts
file is not yet generated at the moment of consumption by the TS compiler.