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 · 3 comments
Assignees
Labels
Milestone

Comments

@hueniverse
Copy link
Member

@hueniverse hueniverse commented Sep 5, 2019

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 this to the 2.1.1 milestone Sep 5, 2019
@hueniverse hueniverse self-assigned this Sep 5, 2019
@hueniverse hueniverse closed this in b715eed Sep 5, 2019
@kanongil

This comment has been minimized.

Copy link
Member

@kanongil 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

This comment has been minimized.

Copy link
Member

@kanongil 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

This comment has been minimized.

Copy link
Member Author

@hueniverse hueniverse commented Sep 5, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.