This repository has been archived by the owner on Jan 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
_typeof is not a function on commonjs import #87
Comments
@topaxi This is caused by double transpiling code. As recommended by documentation of https://github.com/rollup/rollup-plugin-babel you should exclude node_modules e.g:
|
Nice this works! We should probably make this easier to use or put some documentation on this on glimmerjs.com Let me know how I can help out with this. |
digitalkaoz
added a commit
to digitalkaoz/react-static
that referenced
this issue
Sep 26, 2018
react-static@ad87562 introduced some double compiling. like here: glimmerjs/glimmer-application-pipeline#87 so excluding `node_modules` we must!
7 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to import
clipboard
from npm. This results in_typeof is not a function
which seems to be a function defined by babel to support es2015 symbols.The imported module is plain JavaScript so babel transpilation seems unnecessary to me (but we might not know this while importing). I think it might be some rollup issue where
_typeof
is wrongly hoisted?My
ember-cli-build.js
configuration:My component definition:
The text was updated successfully, but these errors were encountered: