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

feat: add support and tests for webpack #45

Merged
merged 8 commits into from
Feb 12, 2019
Merged

feat: add support and tests for webpack #45

merged 8 commits into from
Feb 12, 2019

Conversation

alexander-fenster
Copy link
Contributor

Fixes #44. Turns out gaxios cannot pass querystring parameters when running in the browser because of the bad URL polyfill used. We don't need to have any polyfill for URL since we have window.URL, so let's use it.

Also, added some tests for browser.

@JustinBeckwith JustinBeckwith changed the title feat: webpack it feat: add support and tests for webpack Feb 12, 2019
Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for doing this!

browser-test/browser-test.sh Outdated Show resolved Hide resolved
browser-test/test.browser.ts Outdated Show resolved Hide resolved
browser-test/test.browser.ts Outdated Show resolved Hide resolved
browser-test/test.browser.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/gaxios.ts Outdated Show resolved Hide resolved
src/isbrowser.ts Show resolved Hide resolved
webpack.config.js Outdated Show resolved Hide resolved
@alexander-fenster
Copy link
Contributor Author

Oh, you have execa, I'll make it work with it then.

@alexander-fenster
Copy link
Contributor Author

@JustinBeckwith It's ready for one more look!

await execa('npx', ['webpack'], {cwd: `${stagingPath}/`, stdio: 'inherit'});
const bundle = path.join(stagingPath, 'dist', 'bundle.min.js');
const stat = fs.statSync(bundle);
assert(stat.size < 256 * 1024);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOICE!

@JustinBeckwith JustinBeckwith merged commit 29d5d85 into googleapis:master Feb 12, 2019
@JustinBeckwith
Copy link
Contributor

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lock
Copy link

lock bot commented Mar 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants