Context
I have two projects, main and styles.
Main uses styles as an npm package, importing it as @companyname/styles.
I need to make changes to styles and want to link it locally to see these changes in main.
This is a react app, using Webpack and babel. Yarn is the favoured package manager.
Problem
Using npm link OR yarn link works in so far as I can go into the node_modules/@companyname/styles folder in main and see my changes in there.
However, no changes are reflected in the browser.
I only use one or the other (yarn/npm) at a time, but problem exists with either one
Things I've tried
- Deleting
node_modules, reinstalling and re-linking - Unlinking and re-linking
- Rebuilding
- Clearing npm cache, clearing yarn cache
- Viewing site in incognito
- Deleting
distfolder inmainand reinstalling - Adding
CleanWebpackPluginto my webpack config - Adding
hot: true,to mydevServerconfig in webpack config.
TL;DR
Yarn/npm link not showing my changes in browser, however will show changes in node_modules. Something causing browser to not read changes. Please help.