I changed the getThemeFilename function to include a file extension which was needed for hot reloading.
Why
There was recently a change to add the theme file as a dependency for hot reloading. I was having trouble getting this working in a design system and started debugging what was going on. What I found was the hot reloading logic used getThemeFilename to add the theme file as a dependency. However, the getThemeFilename function was returning the filename without an extension.
my-ds/components/Component/src/theme
I think this works in other parts of the project because require figures out the extension.
I edited node_modules and changed getThemeFilename to test for our default ts and js extensions, and my hot reloading started working. I'll test the change here with a canary.
What Changed
I changed the
getThemeFilename
function to include a file extension which was needed for hot reloading.Why
There was recently a change to add the theme file as a dependency for hot reloading. I was having trouble getting this working in a design system and started debugging what was going on. What I found was the hot reloading logic used
getThemeFilename
to add the theme file as a dependency. However, thegetThemeFilename
function was returning the filename without an extension.I think this works in other parts of the project because
require
figures out the extension.I edited node_modules and changed
getThemeFilename
to test for our defaultts
andjs
extensions, and my hot reloading started working. I'll test the change here with a canary.Todo:
yarn all-contributors add [name] [type]
) see https://github.com/all-contributors/all-contributors/blob/master/docs/cli/usage.mdPublished PR with canary version:
2.4.1-canary.44.566