mirror of
https://github.com/swc-project/swc.git
synced 2024-10-05 04:39:06 +03:00
test(es/module): Add a test for a fixed issue (#8521)
**Related issue:** - Closes #8375
This commit is contained in:
parent
a8518410da
commit
4b4a0a244d
35
crates/swc/tests/fixture/issues-8xxx/8375/1/input/.swcrc
Normal file
35
crates/swc/tests/fixture/issues-8xxx/8375/1/input/.swcrc
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"jsc": {
|
||||
"keepClassNames": true,
|
||||
"output": {
|
||||
"preamble": ""
|
||||
},
|
||||
"parser": {
|
||||
"syntax": "typescript"
|
||||
},
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"preserveAllComments": true,
|
||||
"target": "es2022",
|
||||
"transform": {
|
||||
"decoratorMetadata": false,
|
||||
"legacyDecorator": false
|
||||
}
|
||||
},
|
||||
"minify": false,
|
||||
"module": {
|
||||
"allowTopLevelThis": false,
|
||||
"ignoreDynamic": false,
|
||||
"lazy": false,
|
||||
"noInterop": false,
|
||||
"preserveImportMeta": false,
|
||||
"resolveFully": false,
|
||||
"strict": false,
|
||||
"strictMode": true,
|
||||
"type": "commonjs"
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
import { helloWorld } from "hello";
|
||||
import * as Sentry from '@sentry/node';
|
||||
|
||||
Sentry;
|
||||
helloWorld("SWC");
|
@ -0,0 +1,3 @@
|
||||
export function helloWorld(name: string) {
|
||||
console.log(`Hello, ${name}`);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const _interop_require_wildcard = require("src/@swc/helpers/_/_interop_require_wildcard");
|
||||
const _hello = require("./src/hello");
|
||||
const _node = _interop_require_wildcard._(require("src/@sentry/node"));
|
||||
_node;
|
||||
(0, _hello.helloWorld)("SWC"); /*#__PURE__*/
|
@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "helloWorld", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return helloWorld;
|
||||
}
|
||||
});
|
||||
function helloWorld(name) {
|
||||
console.log(`Hello, ${name}`);
|
||||
}
|
Loading…
Reference in New Issue
Block a user