Skip to content

Commit

Permalink
test(es/module): Add a test for jsc.paths on windows (#6915)
Browse files Browse the repository at this point in the history
**Related issue:**

 - Closes #5165.
  • Loading branch information
kdy1 committed Feb 8, 2023
1 parent f7f18ed commit d18027c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
23 changes: 23 additions & 0 deletions crates/swc/tests/fixture/issues-5xxx/5165/1/input/.swcrc
@@ -0,0 +1,23 @@
{
"module": {
"type": "commonjs",
"strict": true,
"noInterop": true
},
"jsc": {
"target": "es2018",
"baseUrl": ".",
"paths": {
"@modules/import": [
"./src/import.ts"
]
},
"parser": {
"syntax": "typescript",
"decorators": true
},
"transform": {
"decoratorMetadata": true
}
}
}
@@ -0,0 +1,5 @@
const test = 'test';

export {
test
};
3 changes: 3 additions & 0 deletions crates/swc/tests/fixture/issues-5xxx/5165/1/input/src/main.ts
@@ -0,0 +1,3 @@
import { test } from '@modules/import';

console.log(test);
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "test", {
enumerable: true,
get: ()=>test
});
const test = 'test';
@@ -0,0 +1,3 @@
"use strict";
const _import = require("./import");
console.log(_import.test);

0 comments on commit d18027c

Please sign in to comment.