GithubHelp home page GithubHelp logo

Comments (5)

naishe avatar naishe commented on August 16, 2024 1

@stefanpl -- I got it working for the client back then. It was not as convoluted. I need to go back and check how. If you can wait until early next week, I'd probably be able to prepare a PoC/

from babel-plugin-rewire.

stefanpl avatar stefanpl commented on August 16, 2024

Hi 👋

Any updates on TypeScript support @naishe @speedskater ? Couldn't get this to run with TypeScript neither, I'm getting:

The exported identifier "_RewireAPI__" is not declared in Babel's scope tracker
as a JavaScript value binding, and "@babel/plugin-transform-typescript"
never encountered it as a TypeScript type declaration.
It will be treated as a JavaScript value.

This problem is likely caused by another plugin injecting
"_RewireAPI__" without registering it in the scope tracker. If you are the author
 of that plugin, please use "scope.registerDeclaration(declarationPath)".

You can see the setup here (it's very minimal, 2 webpack loaders and 2 babel plugins):
https://github.com/stefanpl/nodejs-typescript-starter/tree/install-babel-plugin-rewire

I also tried this repo, but it's archived and doesn't work for me neither.

Any input very much appreciated!

from babel-plugin-rewire.

stefanpl avatar stefanpl commented on August 16, 2024

@naishe I would very much appreciate it! I can definitely wait until then, just at some point it would be nice to have it for proper testing in a TS environment.

from babel-plugin-rewire.

kibebr avatar kibebr commented on August 16, 2024

@naishe Sorry, any chance you could write a quick guide on how to do it?

from babel-plugin-rewire.

lbineau avatar lbineau commented on August 16, 2024

Same question here. It does not seems to prevent to work with TS though but is an ugly error everytime I run the testing tools.

from babel-plugin-rewire.

Related Issues (20)

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.