Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed trailing slash #113

Merged
merged 2 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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