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: SyntaxError Unexpected token export in importing babel runtime helper #5401

Merged
merged 2 commits into from Mar 28, 2019
Merged

fix: SyntaxError Unexpected token export in importing babel runtime helper #5401

merged 2 commits into from Mar 28, 2019

Conversation

ymmooot
Copy link

@ymmooot ymmooot commented Mar 27, 2019

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

If useESModules option of @babel/plugin-transform-runtime is true, browser can not parse the export.

Resolves: #5400

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.

@codecov-io
Copy link

codecov-io commented Mar 27, 2019

Codecov Report

Merging #5401 into dev will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              dev   #5401      +/-   ##
=========================================
- Coverage   96.05%     96%   -0.05%     
=========================================
  Files          74      74              
  Lines        2532    2529       -3     
  Branches      641     640       -1     
=========================================
- Hits         2432    2428       -4     
- Misses         84      85       +1     
  Partials       16      16
Impacted Files Coverage Δ
packages/babel-preset-app/src/index.js 100% <ø> (ø) ⬆️
packages/vue-renderer/src/renderer.js 95.52% <0%> (-0.5%) ⬇️
packages/webpack/src/config/server.js 100% <0%> (ø) ⬆️

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 04ddcac...6b1fc51. Read the comment docs.

@manniL manniL requested a review from clarkdo March 27, 2019 17:44
@clarkdo
Copy link
Member

clarkdo commented Mar 27, 2019

The useESModules should be true since webpack will process it as babel doc described https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules

I think your issue may be because some other reason, could you provide a repo in the issue?

@ymmooot
Copy link
Author

ymmooot commented Mar 27, 2019

@clarkdo
Here is the repository reproducing the issue 🙏
https://github.com/ymmooot/reproduce-5400

@kiaking
Copy link
Member

kiaking commented Mar 28, 2019

@ymmooot @clarkdo As I mentioned at #5400, when setting mode to spa this will work. So I'm guessing this is not the client side error. It should be happening at node side.

@clarkdo clarkdo changed the title modify babel-preset-app config to fix SyntaxError Unexpected token export fix: SyntaxError Unexpected token export in importing babel runtime helper Mar 28, 2019
@clarkdo
Copy link
Member

clarkdo commented Mar 28, 2019

LGTM, wait for CI passing

@clarkdo clarkdo merged commit 3b85dd9 into nuxt:dev Mar 28, 2019
@pi0 pi0 mentioned this pull request Mar 31, 2019
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

class property does not work in v2.5.1
5 participants