-
-
Notifications
You must be signed in to change notification settings - Fork 257
6.8.0 causes Uncaught ReferenceError: require is not defined
errors
#28
Comments
Sorry, looking into it. It seems like we missed a step when moving babylon out of the main repo. (This was the first release out of it) |
Seems to be resolved? |
@kittens This is still an issue for me in babylon@latest (6.8.1). |
Oh is this just because of default exports? We just need to add the add-module-exports plugin like I did in babel Made #52 |
Does this have to do with the fact that the minor version bump from |
Sorry, I raised this on our internal chat when you originally filed this, but it appears I forgot to comment here, woops! This is because we accidentally didn't transition over our scripts to bundle Babylon together into a single file. Pre-6.8.x, Babylon was processed with You likely have We either need to add the browserify bundling back in, or if we decide we don't want that, you should remove |
We shouldn't add back browserify since there's no module deduping so there's always an extra version of |
Maybe @jmm can chime in, I was under the impression there was a way to bundle your local files without bundling |
@loganfsmyth Just wanted to confirm that I do indeed have this in my webpack :)
|
@loganfsmyth @kittens I can check this out to see what we can do with Browserify to avoid bundling duplicate modules (there are ways of excluding certain modules). But the original reason for Browserifying was to prevent people from requiring "internal" modules, right? Do people still care about that? |
We have the latest babylon running in browser bundled with webpack at my company, and don't have a problem. Though we don't have babylon flagged as noParse. What was the initial reason to bundle babylon with browserify? |
I removed babel-runtime so there's no dependencies now and we can run browserify/webpack/rollup if we wanted to |
Shouldn't be an issue after #190 / https://github.com/babel/babylon/releases/tag/v6.13.1 since we remove requires and use rollup? |
I've moved over to using |
My project's babylon package upgraded to 6.8.0 today as a result of a devDependency of babel-core. As a result, some stuff broke.
Specifically in my app I do some dynamic babel parsing (ala. repl). So I import babel directly like this:
It seems this no longer works with 6.8.0 and results in the following error stack:
The top-most item in the stack is
babylon/lib/index.js
failing onvar _parser = require("./parser");
Rolling back to
babylon@6.7.0
makes the errors go away.I looked through the 6.8.0 CHANGELOG for both babylon and babel-core and can't see any reason why this would be happening. Can you please advise?
The text was updated successfully, but these errors were encountered: