Build A React UI Library Using Webpack From Scratch

preview_player
Показать описание

**
**

Follow Rajat On Social Media
--
Рекомендации по теме
Комментарии
Автор

How to load static assets ?? like if we have path like ../../some.js, how to load this in the bundle.

AbhilashTiwari-le
Автор

Good video. It helps me a lot. As for me, also I had to install react library because of error "can't resolve react" even after types/react installation, and add in webpack.config output.globalObject: "this" because of error "self is not defined ". It works, thank you!

zeppelina
Автор

So does main entrypoint in package.json is assigned a value of bundle file? Also, what happens with ts declaration files? Thanks

ivanshatrov
Автор

Thanks, its good , in your repo i see babel loader and .babelrc added, can you please explain why ?

vssaran
Автор

Great tutorial. Clean and concise. I have followed it through and everything worked as expected. I have one question though. Can you reconfigure your webpack to also work with typescript consumers? When I create a JS react app and link the library it works, when I create a TS react app and link the library it says this: "Cannot find module 'ui-lib' or its corresponding type declarations however it still renders the button, so the linking is correct and the imports are fine, only types are missing. Thank you!

elchuzade
Автор

i still didn't get why react react dom library is missing on package .json ?

balas
Автор

Very nice. Thanks for giving me a starting point. Please add more details about adding SCSS or LESS, SVG, and PNG files. Thank you.

imreborn
Автор

Thank you so much for this video! Do you know by any chance how we can separate the output CSS files for each component?

mahdizerara