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

The newest version, 'import' isn't bable into require. #237

Closed
MapleShaw opened this Issue Mar 7, 2019 · 9 comments

Comments

Projects
None yet
3 participants
@MapleShaw
Copy link

MapleShaw commented Mar 7, 2019

In the file /node_modules/video-react/lib/index.js, 'import' isn't bable into require

image

@mondaychen

This comment has been minimized.

Copy link
Member

mondaychen commented Mar 10, 2019

duplicate with #232

will release a new version soon

@mondaychen

This comment has been minimized.

Copy link
Member

mondaychen commented Mar 10, 2019

Please check if the latest version fixed your issue.

@jeremyckahn

This comment has been minimized.

Copy link

jeremyckahn commented Mar 11, 2019

The latest 0.13.4 release fixed the original issue for me (which I was experiencing) but created a different one. I don't have details I can share yet (all of my error messages reference internal IP at my company), but I will follow up on this issue once I have something specific to share.

@jeremyckahn

This comment has been minimized.

Copy link

jeremyckahn commented Mar 11, 2019

More info: I think that video-react is publishing build artifacts that are incompatible with Webpack-based project toolchains. Based on my debugging, it appears that the package.json's main needs to be "dist/video-react.full.js" and it should have "module": "dist/video-react.es.js". This appears to be somewhat of a reversal of this "Rollback to webpack" commit, but it fixes all of my issues. I hope that this will also maintain compatibility with Rollup-based projects, but I have never used Rollup so I don't know for sure.

I will prepare a PR for this and have it ready shortly!

@mondaychen

This comment has been minimized.

Copy link
Member

mondaychen commented Mar 12, 2019

Can you share your webpack-based project config file? Does it have no babel dependency?

@jeremyckahn

This comment has been minimized.

Copy link

jeremyckahn commented Mar 12, 2019

As I mentioned in my other comment, I think I misunderstood and mis-explained my issue (sorry for the confusion!). The project I am using video-react in is a Lerna-based common component monorepo and actually does not use Webpack at all — it uses Babel directly. If it's helpful, here is my babel.config.js:

/* global module:true */
'use strict';

module.exports = {
	presets: ['@babel/preset-react', '@babel/preset-env'],
	plugins: ['@babel/plugin-proposal-class-properties'],
};

UPDATE: I believe that this is the correct fix.

mondaychen added a commit that referenced this issue Mar 13, 2019

@mondaychen

This comment has been minimized.

Copy link
Member

mondaychen commented Mar 13, 2019

@MapleShaw and @jeremyckahn can you check if 0.13.5 fixes this issue? Thanks

@jeremyckahn

This comment has been minimized.

Copy link

jeremyckahn commented Mar 13, 2019

@mondaychen It's working perfectly for me. Thanks so much for the timely fix! 🙌

@mondaychen

This comment has been minimized.

Copy link
Member

mondaychen commented Mar 13, 2019

@jeremyckahn Thank you for your help on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.