Comments (14)
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)
from babylon.
Seems to be resolved?
from babylon.
@kittens This is still an issue for me in babylon@latest (6.8.1).
from babylon.
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
from babylon.
Does this have to do with the fact that the minor version bump from [email protected]
to [email protected]
is accompanied by a major version bump of babel-runtime
from 5.0.0 to 6.0.0? We are seeing errors in ember-suave
as well as a result of upgrading babylon
.
from babylon.
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 browserify
before being published, which meant that it didn't actually have any require
calls in it, but also meant that Webpack complains when trying to package it.
You likely have noParse: /babylon/
in your webpack config to tell webpack to not complain, but that also means that webpack will not walk through the file looking for require
calls. Then we released 6.8
without the browserify bundling, which means we started having require
calls again.
We either need to add the browserify bundling back in, or if we decide we don't want that, you should remove noParse
from your config. I wouldn't recommend doing that until we make a call on whether to add Browserify again on our end though.
from babylon.
We shouldn't add back browserify since there's no module deduping so there's always an extra version of core-js
.
from babylon.
Maybe @jmm can chime in, I was under the impression there was a way to bundle your local files without bundling node_modules
, but I may be wrong.
from babylon.
@loganfsmyth Just wanted to confirm that I do indeed have this in my webpack :)
// Hides some "This seems to be a pre-built javascript file." warnings
// caused as a result of importing the Babel polyfills for the
// live code editing feature
noParse: /node_modules[\/\\]babylon/
from babylon.
@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?
from babylon.
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?
from babylon.
I removed babel-runtime so there's no dependencies now and we can run browserify/webpack/rollup if we wanted to
from babylon.
Shouldn't be an issue after #190 / https://github.com/babel/babylon/releases/tag/v6.13.1 since we remove requires and use rollup?
from babylon.
I've moved over to using babel-standalone
for my needs here and that has resolved the issue. Closing.
from babylon.
Related Issues (20)
- Can't use object-rest-spread in a function HOT 6
- Should we allow Flowtype `import type` statements when `sourceType:script`? HOT 2
- How to get the "root" path HOT 5
- ES2016 bind syntax does not work with functions HOT 5
- Flow interfaces & `declare class` do not adhere to ASI HOT 2
- Warning if tests fail that if you need to generate fixtures. HOT 2
- React 16 SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag HOT 7
- Set id to null for ArrowFunctionExpressions? HOT 3
- babylon super.xxx will cause performance is very slow HOT 1
- Add sourceType 'function' HOT 12
- Typescript: ExportNamedDeclaration raises SyntaxError when exportExtensions plugin enabled HOT 1
- Unable to parse a class get method with a decorator HOT 2
- static field initializer as an arrow function containing new.target is not allowed
- Unexpected AST for pipeline operator with arrow function HOT 2
- Flow comment parsing HOT 8
- typescript: Support binding pattern in signature HOT 2
- Existential return type annot in arrow function confused with `*=` operator HOT 5
- Error w/ generics in return type annots inside JSXExpressionContainers HOT 3
- [Presets: React + Typescript] Complex method with generic type fails during transpilation HOT 2
- PSA: this repo has been moved to the main babel repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babylon.