Giter Site home page Giter Site logo

babel-test's Introduction

Introduction

This is the most minimal use case I could assemble to showcase my problem. I hope it helps illustrate the issue. If something is missing please contact me at [email protected]

Steps to reproduce

  1. Install dependencies from root (yarn)
  2. Navigate to the main package (cd packages/main)
  3. Run the start script (yarn start)

The start script just runs node -r ./babel.register.js src/index.js which only imports a dummy function from the shared package.

All 3 babel configs (babel.config.js in the root and both .babelrc.js in each package) have console.log statements to check if they are loaded. As you can see, only the root and main configs are loaded, but not the shared one. It also throws an error because it cannot resolve export in shared/utils/index.js, which means that babel isn't transpiling that file, even though babel.register.js should take care of that (according to our previous conversation).

Another thing I need to be able to do is to transpile all the needed files beforehand in order to deploy them and run them with node in a remote server (like heroku). For this purpose I added a yarn build script to the main package, and a yarn run-build script that should run that build with node. That one doesn't work either (but I assume that is because I should tell babel to transpile the other package explicitly, which I don't know how to do).

If you could help me out I would be extremely grateful.

(Be sure to check out the dependency versions I'm using, as I'm not sure they are the correct ones. I tried to use version 7.1.0 of all things babel-related)

babel-test's People

Contributors

monitz87 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.