Skip to content

Commit

Permalink
fix: fixed trailing slash (#113)
Browse files Browse the repository at this point in the history
* Fixed trailing slash

* Updated tests
  • Loading branch information
raouldeheer authored Apr 20, 2022
1 parent f7b7989 commit ca084aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/project16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "project16",
"scripts": {
"build": "tsc && tsc-alias -r replacer.js",
"start": "npm run build && node ./dist/index.js"
"start": "npm run build && node ./dist/server/index.js"
}
}
2 changes: 1 addition & 1 deletion projects/project16/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./dist",
"outDir": "dist/server/",
"declarationDir": "./types",
"removeComments": true,
"importHelpers": false,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function replaceTscAliasPaths(
const output = config.output;

// Finding files and changing alias paths
const posixOutput = config.outPath.replace(/\\/g, '/');
const posixOutput = config.outPath.replace(/\\/g, '/').replace(/\/+$/g, '');
const globPattern = [
`${posixOutput}/**/*.{mjs,cjs,js,jsx,d.{mts,cts,ts,tsx}}`,
`!${posixOutput}/**/node_modules`
Expand Down

0 comments on commit ca084aa

Please sign in to comment.