New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions of Babel Compilation #12
Comments
|
ok great, also does it not matter if I make the |
As I've already said, |
cool thx, closing |
This is a question around use of
webpack-isomorphic-tools
and compilation through babel vs. use of thebabel/register
.I have a script that runs similar to the original demo I shared https://github.com/dtothefp/isomorphic-demo/blob/master/app/index.js. Unfortunately, it is on a private repo so I can't share it here.
Essentially, it uses the
babel/register
and kicks off the process of rendering HTML from a React component. The problem is that this react componentimport
s many internal modules (on our internal NPM registry, some of which are themselves react component libraries) that are written in es6 and NOT pre-compiled. I wrote a small script that uses the babelignore
property to include these external modules in es6 compilation https://babeljs.io/docs/usage/require/#specifying-options and this works great locally, the HTML compiles in about 2 seconds or less.The problem is we are running this on an AWS lamda, and in that environment,
import
ing the component results in compile times greater than 30s. I would like to pre-compile the modules or potentially pre-compile the whole script that contains thewebpack-isomorphic-tools
entry i.e.I'm just wondering if this breaks some of the
require
magic or ifrequire
hooks will still be established regardless bywebpack-isomorphic-tools
if code is pre-compiled through babel and not run through thebabel/register
?The text was updated successfully, but these errors were encountered: