Transpiling deps from node_modules
See original GitHub issueIs it possible to transpile code from separate package as our dependency? That separate package contains untranspiled typescript code and it should go to the bundle along with our TS code.
P.S. "main"
section from package.json
of separate package points to .ts
file.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Why and how to transpile dependencies of your JavaScript ...
Web developers use bundlers (Webpack or Rollup) that transpile their applications' code. We'll figure out how to transpile the dependencies ...
Read more >Transpiling ESM files inside node_modules - Artem Sapegin
The idea is to use esbuild to compile ESM files to CommonJS directly inside the node_modules folder on npm install. Weʼll detect packages...
Read more >How to transpile node_modules with babel and webpack in a ...
Using this modified version we are able to check if all our dependencies are transpiled or not, but it doesn't end there. There...
Read more >Can I transpile TypeScript code of dependencies in ... - Reddit
I have Webpack and ts-loader set up. One of my dependencies (in node_modules/ ) publish typescript code (not .d.ts , just .ts )...
Read more >Is it possible to transpile local modules from node_module?
I was wondering is it possible to transpile local modules from node_modules using webpack? Note: if I change the module type to "commonjs",...
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
I’d add js files automatically if allowJs is set to true, but that brings build time from 6 seconds to 2 mins for me, so it’s an option one should turn on carefully 😃. See
allowjs
branch if you want to check it out.Just looked at it again, and it seems all you need to do is allow plugin to touch js files:
include: ["*.ts+(|x)", "**/*.ts+(|x)", "**/*.js"]
.Currently only ts and tsx files are touched, even though you set
allowJS: true
in tsconfig and typescript would normally process js files in this case.