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

fix(v2): add support esModule to lqip-loader #2693

Merged
merged 1 commit into from
May 17, 2020
Merged

fix(v2): add support esModule to lqip-loader #2693

merged 1 commit into from
May 17, 2020

Conversation

ykzts
Copy link
Contributor

@ykzts ykzts commented Apr 28, 2020

Motivation

Currently url-loader and file-loader have the option esModule is true by default. So @docusaurus/lqip-loader will always throw an exception unless you explicitly set esModule to false.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Use @docusaurus/lqip-loader alone or with url-loader or file-loader according to README.md.

Related PRs

Nothing.

@ykzts ykzts requested a review from yangshun as a code owner April 28, 2020 23:46
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 28, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Apr 28, 2020

Deploy preview for docusaurus-2 ready!

Built with commit decedb0

https://deploy-preview-2693--docusaurus-2.netlify.app

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

Can you elaborate more on why this is needed? Are you using this in an external project?

@ykzts
Copy link
Contributor Author

ykzts commented May 17, 2020

Yes, I want to use it in my project. Merging these changes will reduce the size of the file after building with tree shaking in an environment that supports ES Modules. I think it works for Docusaurus as well.

@yangshun yangshun added the pr: new feature This PR adds a new API or behavior. label May 17, 2020
@yangshun yangshun merged commit 5ea263d into facebook:master May 17, 2020
@yangshun yangshun added pr: bug fix This PR fixes a bug in a past release. and removed pr: new feature This PR adds a new API or behavior. labels May 17, 2020
@ykzts ykzts deleted the es-module branch May 17, 2020 11:27
@lex111 lex111 added this to the v2.0.0-alpha.55 milestone May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants