test node import
This commit is contained in:
1 parent
c44d5925a4
commit
015e166076
3 files changed
+21
No files matched your search
@@ -0,0 +1 @@
|
||||
export const add = (a: number, b: number) => a + b;
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { add } from '#ab';
|
||||
|
||||
console.log(add(1, 2));
|
||||
Reference in new issue
Block a user