test node import

This commit is contained in:
熊潇 2025-04-21 13:13:54 +08:00
parent c44d5925a4
commit 015e166076
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1 @@
export const add = (a: number, b: number) => a + b;

View File

@ -0,0 +1,17 @@
{
"name": "node-importer",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
"license": "MIT",
"packageManager": "pnpm@10.6.2",
"type": "module",
"imports": {
"#ab": "./import-module/ab.ts"
}
}

View File

@ -0,0 +1,3 @@
import { add } from '#ab';
console.log(add(1, 2));