cannot support @rollup/plugin-babel
See original GitHub issueDescribe the bug
babel tranform es6 is bad, look this:
that is right in rollup:
Reproduction
https://stackblitz.com/edit/vitejs-vite-xcsg9e
System Info
System:
OS: macOS 12.5
CPU: (8) x64 Apple M1 Pro
Memory: 66.13 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.19.1 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 8.13.2 - /opt/homebrew/bin/npm
Browsers:
Firefox: 103.0.2
Safari: 15.6
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
@rollup/plugin-babel - npm
@rollup/plugin-babel. A Rollup plugin for seamless integration between Rollup and Babel. Why? If you're using Babel to transpile your ...
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
To make this actually do stuff, we need to update rollup.config.js . Inside, we import the Babel plugin, then add it to a...
Read more >rollup-plugin-babel | Yarn - Package Manager
This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel. Seamless integration between Rollup and Babel.
Read more >Rollup-plugin-babel - npm.io
The following applies to Babel 6 only. If you're using Babel 5, do npm i -D rollup-plugin-babel@1 , as version 2 and above...
Read more >rollup.js
For interoperability, Rollup also supports loading configuration files from ... Imported values cannot be reassigned, though imported objects and arrays can ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For plugin-legacy not supporting library mode, see #1639.
@zjjjjjjjjjjd Please make it clear what is expected. But I believe you’ll need to use
getBabelOutputPlugin
instead. https://github.com/rollup/plugins/blob/master/packages/babel/README.md#running-babel-on-the-generated-codeplugin-legacy
cannot support library mode 😦