Comments (2)
Yep. tsx just spins up Node.js with this loader to teach it how to handle TypeScript files.
The run-time is still Node, so you should simply add another loader to teach Node.js how to handle .tpl
files and pass it in.
If Node.js allows multiple loaders, you can do this:
tsx --loader ./tpl-loader.js ./file.ts
If not, feel free to open a feature request for it.
from tsx.
The loader option as a record is only supported in build mode. However as I know tsx
is working using the transform mode of esbuild. We may have to simulate that manually.
from tsx.
Related Issues (20)
- c8 incorrectly reports 100% coverage when using tsx HOT 2
- tsx fails to find aliased imports from workspace dependencies HOT 2
- Is this for Typescript or not?
- All first lines uncovered when using `c8` with `tsx --test` HOT 5
- support for webstorm plugins? HOT 2
- Watcher continues to watch files after removal as dependency (dead imports)
- tsx should come first when chaining loaders HOT 3
- ERR_UNKNOWN_FILE_EXTENSION with `import 'tsx'`, but `--import tsx` works HOT 4
- Support `customConditions` in `tsconfig.json` HOT 2
- `tsImport()` not register CJS handling when `type: module` presented in root package HOT 2
- Getting `SyntaxError: The requested module 'x' does not provide an export named 'x'` with tsx 4.13.1 HOT 1
- tsx 4.13.1 fails to find exported module in @aws-sdk/client-iot-data-plane with Node.js 20 HOT 6
- Module cannot be resolved with `[email protected]` HOT 4
- [Regression] ESM module import using the # import pattern no longer works since 4.12.0 HOT 1
- Since v4.12 ,code execution on the windows has been consistently reporting errors HOT 2
- Cannot find module HOT 1
- [Regression] ERROR: Transforming JavaScript decorators to the configured target environment ("node21.3.0") is not supported yet HOT 1
- CommonJS directory import fails HOT 1
- webpack-cli (v5.1.4) doesn't work with tsx(v4.14.0) for webpack.config.ts HOT 3
- ERR_MODULE_NOT_FOUND when importing without .js since v4.14.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsx.