Comments (11)
Yeah, I know this issue. I'm not sure what causes it though. Using uglifyify used to solve this, I think because of dead code elimination, but maybe not anymore?
This is part of core-js
. Maybe there is an issue with circular dependencies, not sure. @zloirock, have you seen this before?
from astexplorer.
Uh, look like I removed uglifyify from npm run watch
in one of the latest commits. Will add it back, but it would still be great to find a real solution, because uglifyify slows down the build...
from astexplorer.
have you seen this before?
Sure, and each time it was mistake in build configuration. For example, babel
not ignored babel-runtime
.
from astexplorer.
After looking a bit more into the generated files, it seems that $.def
is required from dist/app.js
, but is only defined in dist/parsers/babel.js
.
Not sure why it is not defined in dist/app.js
. I expected that any direct dependency of the entry file needs is also contained in it. @arian, am I doing something wrong here?
from astexplorer.
How do you reprodue this? I just ran esprima_ast_explorer locally, using npm run watch
, and the $.def
module ends up in dist/app.js
, just like the object.assign module.
Does updating to the latest partition-bundle help? 2.2.0 fixed some problems with deduped modules.
from astexplorer.
Looks like I'm already using 2.2.1. I'm using
watchify -p [partition-bundle --map partition.json --output ./ --main ./src/app] \
-o /dev/null -v
It looks like there are two ./$.def
modules, one with ID 650 (this one) and one with 218 (this one), i.e. they are definitely different modules. 650 is indeed contained in dist/app.js
, but 218 is not (not sure if you'd get the same numbers in your build).
The are quite a few modules in dist/app.js
referencing 218, e.g.
loadjs.d("322",function(require,module,exports){
// 19.1.3.1 Object.assign(target, source)
var $def = require('./$.def');
$def($def.S + $def.F, 'Object', {assign: require('./$.assign')});
},{"./$.assign":209,"./$.def":218});
but loadjs.d("218", ...)
is in dist/parsers/babel.js
.
I guess reusing the same (relative) module name shouldn't matter?
from astexplorer.
I'll check if using webpack would solve this.
from astexplorer.
@fkling Yes please! Currently scripts section using combination of browserify with some NIX-specific things so that I couldn't even contribute from own Windows machine despite this being a JS project :(
from astexplorer.
I switched to webpack in 89db32f. It seems to work well so far. Let me know how it works for you.
from astexplorer.
Still seeing a bunch of webpack warnings on build (like, trying to require
.md
files somewhere and so on), but other than that, seems to build fine. Thanks!
from astexplorer.
Yeah, I didn't figure out where it would try to load an .md
file, but everything worked for me so I didn't bother with it too much.
from astexplorer.
Related Issues (20)
- Change request: Replace the GLSL parser HOT 1
- [Feature request] add a tab with the generated Babel code HOT 2
- App crashes when data in localStorage references unexisting parser
- Feature request: jscodeshift output from arbitrary input
- Add support for semantic / tree-sitter HOT 1
- The Solidity parsers are outdated. There's a maintained alternative that should be used
- error when typescript with TSAsExpression HOT 1
- Update espree parser HOT 1
- [Feature request] Upgrade Hermes parser HOT 1
- Update Go parser with generics support
- Is Groovy Supported by astexplorer ?
- CodeMirror editor displays error on JavaScript class private fields HOT 1
- Update TypeScript version
- Unable to create snippet error
- Website freezes if Java Parser is selected with JSON view tab HOT 1
- [BUG] SWC spans are broken with multi-byte offsets and accumulating offsets
- python - "Unexpected token" error on ellipsis HOT 1
- [PROJECT BUG] When executing `npm install` in the `website` directory, an error is thrown HOT 3
- [PROJECT BUG] Module not found: Error: Can't resolve '@swc/wasm-web/wasm.js' in...
- Add a parseFragment option for parse5
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 astexplorer.