The Wayback Machine - https://web.archive.org/web/20210715004414/https://github.com/nuxt/nuxt.js/pull/9328
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

chore(pkg): build for es2019 target #9328

Merged
merged 2 commits into from May 24, 2021
Merged

chore(pkg): build for es2019 target #9328

merged 2 commits into from May 24, 2021

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented May 24, 2021

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Use esbuild with taget: es2019 (using node* transform to CJS which breaks rollup chunks!) to build dist files. Fixes #9321 Closes #9322

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.
@pi0 pi0 requested review from Atinux, clarkdo and danielroe May 24, 2021
@pi0 pi0 marked this pull request as draft May 24, 2021
@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented May 24, 2021

Codecov Report

Merging #9328 (62b1bd7) into dev (e687842) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #9328   +/-   ##
=======================================
  Coverage   65.16%   65.16%           
=======================================
  Files          94       94           
  Lines        4105     4105           
  Branches     1124     1124           
=======================================
  Hits         2675     2675           
  Misses       1152     1152           
  Partials      278      278           
Flag Coverage Δ
unittests 65.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e687842...62b1bd7. Read the comment docs.

@clarkdo
Copy link
Member

@clarkdo clarkdo commented May 24, 2021

Nice change

@pi0 pi0 changed the title chore(pkg): build for node12 target chore(pkg): build for es2019 target May 24, 2021
@pi0 pi0 marked this pull request as ready for review May 24, 2021
@pi0 pi0 merged commit f4a6b38 into dev May 24, 2021
19 checks passed
19 checks passed
@github-actions
setup (ubuntu-latest, 12)
Details
@github-actions
setup (windows-latest, 14)
Details
@github-actions
setup (ubuntu-latest, 14)
Details
@github-actions
lint (ubuntu-latest, 14)
Details
@github-actions
test-unit (windows-latest, 14)
Details
@github-actions
audit (ubuntu-latest, 14)
Details
@github-actions
build (windows-latest, 14)
Details
@github-actions
test-unit (ubuntu-latest, 12)
Details
@github-actions
test-dev (windows-latest, 14)
Details
@github-actions
test-unit (ubuntu-latest, 14)
Details
@github-actions
build (ubuntu-latest, 12)
Details
@github-actions
build (ubuntu-latest, 14)
Details
@github-actions
lint-app (ubuntu-latest, 14)
Details
@github-actions
test-dev (ubuntu-latest, 12)
Details
@github-actions
test-dev (ubuntu-latest, 14)
Details
@github-actions
test-e2e (ubuntu-latest, 12)
Details
@github-actions
test-e2e (ubuntu-latest, 14)
Details
@github-actions
release-commit
Details
@semantic-pull-requests
Semantic Pull Request ready to be squashed
Details
@pi0 pi0 deleted the fix/nullish branch May 24, 2021
@clarkdo
Copy link
Member

@clarkdo clarkdo commented May 24, 2021

OOC, what will be broken when using node ?

@pi0
Copy link
Member Author

@pi0 pi0 commented May 24, 2021

@clarkdo cli dist (using dynamic imports) was getting broken

@clarkdo
Copy link
Member

@clarkdo clarkdo commented May 24, 2021

Is dynamic import not transpiled ?
I guess a version<12.20 will work ? But es2019 look better to me as well.

@pi0
Copy link
Member Author

@pi0 pi0 commented May 24, 2021

Is dynamic import not transpiled ?

Actually it transpiled to cjs by esbuild when using node while shouldn't (rollup is esm native and supports cjs with CommonJS plugin). Maybe we could use node if there was a node-es target...

@clarkdo
Copy link
Member

@clarkdo clarkdo commented May 24, 2021

Right, so node version >= 12.20 in target should work as it fully supports dynamic import.

@clarkdo
Copy link
Member

@clarkdo clarkdo commented May 24, 2021

OK, it seems not evanw/esbuild#1084 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants