-
-
Notifications
You must be signed in to change notification settings - Fork 257
fix: outputPath function overriden by useRelativePath #139
Conversation
…an outputPath function to overrride where the file is put
@economysizegeek Ow! I see and I'm sorry for this, but this fix also broken the |
I left that block in tact and didn't modify it from what is happening with relative path. (I'm not sure it made sense to handle an outputpath function with the userelativepath - so i left them mutually exclusive). Could you give a sample config and explain what happens that is wrong? |
Apparently isn't different, but, if you use |
Just so I could write a test - can you tell me the config.name you have set so I can see all three arugments sent to the join so it resolves to path.posix.join("foo", "../foo", ?) == "../foo" |
@economysizegeek Sorry if I'm slow in answering. I'm working in another approach to |
i'm still having this issue, when I use relative path. It overides the publicpath and appends '../' to the front of the relative folder.
|
|
What kind of change does this PR introduce?
bugfix - The new useRelativePath option code - did not handle the case where you used a function for the outputPath generation.
Did you add tests for your changes?
Yes - I added in a test to make sure that if you use a function for outputPath it is called. If you use the useRelativePath it is ignored.
If relevant, did you update the README?
You don't currently document using outputPath as a function so I wasn't sure I should.
Summary
New code broke old behavior. If you use a function to set the outputPath it was expected that the function would be the decider on where the output of the file is. Recent code took that away:(
Motivation: Recent code broke old behavior. I updated to the current version and my app stopped generating correctly.
Does this PR introduce a breaking change?
No - it restores functionality.
Other information
There weren't any tests for outputPath as a function. I've added one so that in the future the feature will be protected.