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

Latest babel-preset-env (7.4.3) breaks this plugin #73

Open
TheLudd opened this issue Apr 3, 2019 · 10 comments
Open

Latest babel-preset-env (7.4.3) breaks this plugin #73

TheLudd opened this issue Apr 3, 2019 · 10 comments

Comments

@TheLudd
Copy link

TheLudd commented Apr 3, 2019

I believe this change in babel-preset-env babel/babel#9781 breaks this plugin. Re-create by upgrading babel-preset-env in this package and run the tests.
I tried going through the code in order to find how to fix it but I didn't manage.

@MarshallRJ
Copy link

I am encountering the same issue.

TheLudd added a commit to TheLudd/babel-plugin-add-module-exports that referenced this issue Apr 4, 2019
`[email protected]` has changed the format of how default exports
are generated. This change makes sure the tests pass with the dependency
upgraded.

closes 59naga#73
TheLudd added a commit to TheLudd/babel-plugin-add-module-exports that referenced this issue Apr 4, 2019
`[email protected]` has changed the format of how default exports
are generated. This change makes sure the tests pass with the dependency
upgraded.

closes 59naga#73
@TheLudd
Copy link
Author

TheLudd commented Apr 4, 2019

Managed to solve it in #74

@ljharb
Copy link

ljharb commented Apr 4, 2019

#70 already solves it.

@TheLudd
Copy link
Author

TheLudd commented Apr 4, 2019

@ljharb Comitted in october. I wonder what the hope of a merge is
@59naga Are you notified about this?

@ljharb
Copy link

ljharb commented Apr 4, 2019

They’ve been tweeted at and emailed, since October.

@TheLudd
Copy link
Author

TheLudd commented Apr 5, 2019

@lijunle Are you able to review/merge/release?

@lijunle
Copy link
Contributor

lijunle commented Apr 16, 2019

Hi, all. I found that I have NPM package management access. So, I directly merged #70 into my personal branch and publish it as version 1.0.1. Please check if it works.

@59naga If you are reading this comment, maybe you want to merge back my personal branch to master.

@lijunle
Copy link
Contributor

lijunle commented Apr 17, 2019

Follow up: version 1.0.1 is unpublished due to #76

@lijunle
Copy link
Contributor

lijunle commented Apr 17, 2019

Try version 1.0.2 to check if it mitigate this issue.

@pravi
Copy link

pravi commented Jul 3, 2021

@lijunle looks like this plugin don't work well with @babel/plugin-transform-modules-umd (or even rollup with babel plugin for that matter)

umd module throws "Uncaught ReferenceError: module is not defined" in browser console. The same worked with babel 6 earlier.

For autosize 4.0.3:

babel 6 has,

(function (global, factory) {
if (typeof define === "function" && define.amd) {
 define(['module', 'exports'], factory);

But babel 7 has,

(function (global, factory) {
if (typeof define === "function" && define.amd) {
 define(["exports"], factory);

see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990458 for details.

In the end, I removed add-module-exports plugin and used rollup to generate umd, which worked.

Update: it looks like a known limitation of babel umd plugin babel/babel#10696

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

Successfully merging a pull request may close this issue.

5 participants