-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Replace error throwing with logger warning when publicPath is not absolute #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @andyexeter,
I agree with you on that one. Throwing an error there is a tad violent, even if using a relative path seems to cause other issues (see this comment in #26).
Since a lot of people are asking about the relative path stuff, I also think we should work on support for it (we just need some time to play with it & experiment - Webpack itself may have some issues with relative paths). The question is - should we merge this now when we know there is a legit issue (#26 (comment)) that needs to be figured out? |
In my opinion merging it now won't be a big issue since the user would still be warned, and as @andyexeter said we already kinda do the same thing in webpack-encore/lib/WebpackConfig.js Lines 140 to 152 in bcfbbfd
|
Hey @weaverryan - do you think you could take a look at merging this? The issue you referenced in #26 wouldn't change whether this was merged or not, and the warning would still let people know they could experience issues when using a relative path. It should be down to the end user to decide whether they want to use a relative path rather than being forced not to by the plugin. |
Would be great if you look into this issue again @andyexeter and @weaverryan. |
Merged and I've just tagged 0.17.2. If you use this feature, I would appreciate it if you posted any feedback or "findings" on #26 so that we can determine of the relative paths work, or if it causes issues. Thanks! |
There are valid use cases for setting the publicPath to something not starting with a forward slash as discussed in #88 and #26
Throwing an error and stopping compilation is overkill for this and beyond the remit of webpack encore, so I propose this PR where a warning is given to the user instead and the
setPublicPath
method falls in line with behaviour ofsetManifestKeyPrefix