-
Notifications
You must be signed in to change notification settings - Fork 287
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
Support for tsconfig paths
#150
Comments
@odensc sounds like a good idea. I think |
* Revert "fix minify default (#168)" This reverts commit c289b28. * Revert "Reduce asset emission and handle unexpected core assets (#166)" This reverts commit b83e921. * Revert "use graceful-fs (#167)" This reverts commit 4ab1f82. * Revert "fix ignore" This reverts commit e6ab392. * Revert "add typescript config for test" This reverts commit fa95d0b. * Revert "0.6.0" This reverts commit 2f12e50. * Revert "add typescript test" This reverts commit d4d0ead. * Revert "Add support for tsconfig `paths`. (fixes #150) (#151)" This reverts commit 4c227fb.
I am still getting the same error as @odensc tsconfig.json {
"compilerOptions": {
"outDir": "dist",
"module": "commonjs",
"moduleResolution": "node",
"target": "esnext",
"lib": ["esnext"],
"sourceMap": true,
"baseUrl": ".",
"rootDir": "./",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"suppressImplicitAnyIndexErrors": true,
"esModuleInterop": true,
"noUnusedLocals": false,
"skipLibCheck": true,
"noUnusedParameters": false,
"declaration": true,
"paths": {
"@shuffl/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
now.json {
"version": 2,
"env": {
"IS_NOW": "true"
},
"builds": [
{
"src": "./src/**/*.ts",
"use": "@now/node@canary"
}
],
"routes": [
{ "src": "/(.*)", "dest": "/src/index" }
]
} |
Hi @seawatts, if you could create a minimal repo that reproduces your issue that would be great. I can't seem to reproduce this with your basic tsconfig: https://gist.github.com/odensc/d52147afecfa697852171402cf5eb605 Perhaps it has something to do with |
Hi @odensc, The reproduction for this issue is here: I have a repo with roughly the following structure
and the following lines in my tsconfig.json:
Then I would like my import paths beginning with With this setup, I'm able to successfully run However, when I deploy to now, I see the following output error when I send a GET request to any of my endpoints:
|
Hey @liamdanielduffy, Again, I cannot reproduce this with your example and Sorry I couldn't help. |
No worries, I’ll follow up in the now-builders repo! |
In my
tsconfig.json
I use thepaths
option:Which allows me to import files as such:
However ncc's module resolution is incompatible with this feature, giving the following error:
Something like
tsconfig-paths-webpack-plugin
could be used to support this configuration.I could submit a PR for this if there are no objections.
The text was updated successfully, but these errors were encountered: