Comments (2)
Could you provide a minimal code snippet to reproduce this issue?
from swc-node.
@Brooooooklyn
My code
@Delete()
@SerializeOptions({ groups: ['category-list'] })
async destroyMulti(
@Query()
{ page, limit }: QueryCategoryDto,
@Body()
{ trash, categories }: DeleteCategoryMultiDto,
) {
return this.categoryService.deletePaginate(
categories,
{
page,
limit,
},
{},
trash,
);
}
and
if running by @swc/register
every thing is work fine
const runner = nodemon({
script: 'src/main.ts',
ext: 'js,json,ts',
watch: ['src'],
ignore: ['.git', 'node_modules', 'dist', 'scripts'],
execMap: {
ts: 'node -r @swc/register -r module-alias/register',
},
env: {
NODE_ENV: environment(),
},
cwd: path.resolve(__dirname, '..', '..'),
spawn: true,
});
runner.once('start', () => {
console.log();
console.log('Server has started:');
if (urls.length > 0) {
console.log(`- Local: ${chalk.green.underline(urls[0])}`);
}
if (urls.length > 1) {
console.log(`- Network: ${chalk.green.underline(urls[1])}`);
}
});
runner.on('restart', () => {
console.log();
console.log(chalk.yellow('Server is in restarting...'));
});
but when change to @swc-node/register
,will get this error
execMap: {
ts: 'node -r @swc-node/register -r module-alias/register',
},
I think the reason that is @swc-node/register
not read the config file .swcrc
,
{
"sourceMaps": false,
"jsc": {
"loose": true,
"parser": {
"syntax": "typescript",
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"target": "es2020",
"externalHelpers": false
},
"module": {
"type": "commonjs"
}
}
how to read it for this project @swc-node
?
from swc-node.
Related Issues (20)
- @swc-node/[email protected] - Cannot use import statement outside a module HOT 3
- register/esm load result mismatch HOT 3
- swc-node cannot triggered breakpoints correctly. HOT 3
- Cannot use import statement outside a module after upgrading @swc-node/jest HOT 5
- @swc-node/jest doesn't pass options from tsconfig to swc properly HOT 2
- swc-node/register does not pick up swcrc correctly HOT 3
- swc-node issue importing files outside of root directory HOT 3
- can not register @swc-node/register/esm with ERR_PACKAGE_PATH_NOT_EXPORTED error HOT 1
- @swc-node/register/esm doesn't recognize `.ts` file HOT 6
- Potential Memory Leak with ESM in Node v20.0.0
- Mocking with jest doesn't work HOT 9
- Programmatic options passed to `register` are always ignored. HOT 3
- TypeScript's "satisfies" operator causes Syntax Error HOT 1
- Sourcemaps are broken for @swc-node/register/esm HOT 3
- SyntaxError: Unexpected token '?' HOT 1
- `package.json` "imports" field support
- `@swc-node/register` broken imports HOT 10
- Question: how to make swc-node to use less memory HOT 3
- Setting up `swc-node/jest` with pnpm
- Using `@swc/core` version `1.3.85` crashes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swc-node.