importing Aframe breaks build
See original GitHub issueusing the latest dist at https://github.com/aframevr/aframe/tree/master/dist
whenever I try to use es6 modules to import aframe:
import './aframe.min.js'
I get this error:
aframe.min.js:19685 Uncaught TypeError: systems[name] is not a constructor at HTMLElement.value (aframe.min.js:19685) at HTMLElement.value (aframe.min.js:19670) at HTMLElement.value (aframe.min.js:19603) at HTMLElement.wrappedMethod (aframe.min.js:18416) at module.exports.registerElement (aframe.min.js:18325) at Object.104.../../lib/three (aframe.min.js:19538) at o (aframe.min.js:1) at aframe.min.js:1 at Object.147.../package (aframe.min.js:22136) at o (aframe.min.js:1)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top Results From Across the Web
A-Frame .obj model displaying but broken - Stack Overflow
I've set up an example on Glitch if that makes things easier. Your exported obj file has a broken format for WebGL! During...
Read more >A-Frame WebVR Tutorial 9 - Model Loading - YouTube
Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top...
Read more >A-Frame v1.0.0 - WebXR Support, AR Mode
#aframe in WebAR apps, please import latest ; #aframe, v1.0.0 has been shipped ; @aframevr team for the great work. It's outstanding.
Read more >Frames and Groups - Figma Help Center
To make a frame, choose the Frame Tool F and drag out an area of the screen, or use: macOS: Command-Option-G; Windows: Control...
Read more >Part 2: Use and Style React Components - Gatsby
Import and use a pre-built component from another package. Create your own reusable “building block” component. Use component props to change the way...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Scripts that have
type="module"
are automatically assigned the defer property, so they will essentially run at the end of<body>
. However, A-Frame requires that the script is included before the body/scene.I’m not sure why this is the case, as according to this, “the script that registers [custom components] has to be loaded after the DOM is parsed”.
Related: #4242.
(A script tag with type=“module” implies defer, as @mattrossman pointed out above.)