-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replacing dependency with td.replace(path, replacement) doesn't work #249
Comments
Furthermore, the following:
outputs this:
which is surprising because both someFunc and the file where I'm calling td.replace from is in a sub-directory of myProjRootDir. So I tried to pass td.replace a path that allows it to resolve from root directory, and it outputted this:
Is it because I'm using Webpack? I think why td.replace failed to import at first because it isn't aware of the import resolvers I've passed to Webpack. However, I don't know why it gave a syntax error after the import was resolved. I must have overlooked something. |
This isn't enough for me to go on. Please post a minimal example project we can work from to reproduce. |
Okay will do. I'll post it here as soon as it's ready. |
Sorry, I've tried to do the same thing on a different project and it worked. There must've been something wrong in my previous development environment setup. I'm closing this now. |
Here, I've used
td.replace('./virtualClassnames', virtualCns)
to completely replace the object thatvirtualClassnames
exports:Here's the function being tested, I've logged the supposedly replaced
virtualClassnames
but it doesn't output as expectedThe actual
virtualClassnames
:The text was updated successfully, but these errors were encountered: