I'm using swc to build a project that works with modules
{
// ...
"type": "module"
// ...
}
when I build using the swc cli it doesn't resolve all the paths and puts .js at the end
examples
import { database } from '#/database/drizzle'
should look like this when the build is complete
import { database } from './database/drizzle.js'
There should be an option to resolve fullpaths like this package implements.
Using this package you can use an argument that resolves all paths
https://www.npmjs.com/package/tsc-alias
// ...
"tsc-alias": {
"resolveFullPaths": true
}
/// ....
I'm using swc to build a project that works with modules
{ // ... "type": "module" // ... }when I build using the swc cli it doesn't resolve all the paths and puts .js at the end
examples
should look like this when the build is complete
There should be an option to resolve fullpaths like this package implements.
Using this package you can use an argument that resolves all paths
https://www.npmjs.com/package/tsc-alias