Skip to content
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

Revert Url hack #6

Closed
hueniverse opened this issue Sep 5, 2019 · 4 comments
Closed

Revert Url hack #6

hueniverse opened this issue Sep 5, 2019 · 4 comments
Assignees
Labels
dependency Update module dependency
Milestone

Comments

@hueniverse
Copy link
Contributor

Reverting #4 as it increases bundle size by 12K. Basically, the node Url shim it pretty big and includes punycode anyways so this saves nothing for now.

@hueniverse hueniverse added the dependency Update module dependency label Sep 5, 2019
@hueniverse hueniverse added this to the 2.1.1 milestone Sep 5, 2019
@hueniverse hueniverse self-assigned this Sep 5, 2019
@kanongil
Copy link
Contributor

kanongil commented Sep 5, 2019

You can avoid the node Url dependency if you require only node v10+. Then the URL class will be available in a global. URL itself is pretty widely supported.

@kanongil
Copy link
Contributor

kanongil commented Sep 5, 2019

This can also be handled in web pack. Eg. add this to the config:

    resolve: {
        alias: {
            url: Path.join(__dirname, 'src/url.js'),
        }
    }

and this src/url.js file:

exports.URL = URL;

@hueniverse
Copy link
Contributor Author

Cool. I'll try it later before I close joi v16.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependency Update module dependency
Projects
None yet
Development

No branches or pull requests

2 participants