@flightdev/loader 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @flightdev/loader
|
|
2
2
|
|
|
3
3
|
Optional ESM loader for TypeScript extension resolution in Node.js. This package enables seamless imports without explicit file extensions.
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ This package is **optional**. Modern Node.js versions (22.18+) include native Ty
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install @
|
|
16
|
+
npm install @flightdev/loader
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
@@ -35,7 +35,7 @@ node ./server.ts
|
|
|
35
35
|
For older Node.js versions or custom resolution:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
node --import @
|
|
38
|
+
node --import @flightdev/loader/register ./server.js
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
### Option 3: tsconfig.json Configuration
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
getRecommendedFlags,
|
|
86
86
|
resolveWithExtensions,
|
|
87
87
|
RESOLVE_EXTENSIONS
|
|
88
|
-
} from '@
|
|
88
|
+
} from '@flightdev/loader';
|
|
89
89
|
|
|
90
90
|
// Check Node.js capability
|
|
91
91
|
if (supportsNativeTypeScript()) {
|
|
@@ -109,8 +109,8 @@ Flight's bundlers (Vite, esbuild, Rolldown) include automatic extension resoluti
|
|
|
109
109
|
|
|
110
110
|
```typescript
|
|
111
111
|
// Automatic - resolve.extensions is configured by default
|
|
112
|
-
import { defineConfig } from '@
|
|
113
|
-
import { vite } from '@
|
|
112
|
+
import { defineConfig } from '@flightdev/core';
|
|
113
|
+
import { vite } from '@flightdev/bundler-vite';
|
|
114
114
|
|
|
115
115
|
export default defineConfig({
|
|
116
116
|
bundler: vite(),
|
|
@@ -121,14 +121,14 @@ export default defineConfig({
|
|
|
121
121
|
|
|
122
122
|
```typescript
|
|
123
123
|
// Automatic - resolveExtensions is configured by default
|
|
124
|
-
import { esbuild } from '@
|
|
124
|
+
import { esbuild } from '@flightdev/bundler-esbuild';
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
### Rolldown
|
|
128
128
|
|
|
129
129
|
```typescript
|
|
130
130
|
// Automatic - resolve.extensions is configured by default
|
|
131
|
-
import { rolldown } from '@
|
|
131
|
+
import { rolldown } from '@flightdev/bundler-rolldown';
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
## Requirements
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flightdev/loader",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Optional ESM loader for TypeScript extension resolution in Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flight",
|
|
@@ -36,6 +36,12 @@
|
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=20.0.0"
|
|
38
38
|
},
|
|
39
|
+
"homepage": "https://github.com/EliosLT/FlightDev",
|
|
40
|
+
"repository": {
|
|
41
|
+
"url": "https://github.com/EliosLT/FlightDev.git",
|
|
42
|
+
"directory": "packages/loader",
|
|
43
|
+
"type": "git"
|
|
44
|
+
},
|
|
39
45
|
"scripts": {
|
|
40
46
|
"build": "tsup",
|
|
41
47
|
"dev": "tsup --watch",
|