Shopify / javascript-utilities

A set of utilities for JavaScript and TypeScript projects at Shopify.
MIT License
45 stars 9 forks source link

Update url.ts #7

Closed michenly closed 7 years ago

michenly commented 7 years ago

change how we import url

lemonmade commented 7 years ago

Hmm I feel this might break as well for the client bundle. Can we maybe do const {parse} = require('url'); only in the branch where we know that we are on the server? That should work 100% of the time I think.

michenly commented 7 years ago

The linter complain about it

src/url.ts[1, 14]: require() style import is forbidden

just disabled it for this case?

lemonmade commented 7 years ago

Yeah, just disable it.