We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have the following setup in my tsconfig.json
"baseUrl": "./", "paths": { "@project/*": ["./*"], "*": ["./src/*"], "@*": ["./src/*"], }, //"plugins": [ // { "transform": "ts-transformer-imports" } //], "plugins": [ { "transform": "@zerollup/ts-transform-paths", "exclude": ["*"] } ],
And in my start.ts
import { name as appName } from '@project/package.json'
After compiling with ttsc I get this in my start.js
[...] Object.defineProperty(exports, "__esModule", { value: true }); var package_json_1 = require("@project/package.json"); var app_1 = __importDefault(require("./app")); [...]
It looks like it cant map the @project/package.json reference and just leaves it like this, without any error or warning...
@project/package.json
With ts-transformer-imports (commented in the tsconfig file) and with tsconfig-paths it works ok, and I get package.json mapped like this:
ts-transformer-imports
Object.defineProperty(exports, "__esModule", { value: true }); var package_json_1 = require("../package.json"); var app_1 = __importDefault(require("./app")); var config_1 = __importStar(require("./lib/config/config"));
Also tried with this configuration in tsconfig, same result:
"baseUrl": "./src", "paths": { "@project/*": ["./../*"], //"@project/package.json": ["./../package.json"], "@*": ["./*"],
I'm not sure if the problem is with having a reference to something outside of my baseUrl or with references to .json files
thanks a lot
The text was updated successfully, but these errors were encountered:
fix(ts-transform-paths): import with extension #21
46f4933
try 1.7.8
Sorry, something went wrong.
I can confirm that with version 1.7.8 everything seems to work ok.
No I can run ts-node with ts-node -C ttypescript src/start.ts and it works too
ts-node -C ttypescript src/start.ts
You've responded with a new version solving the issue in just a couple of hours!!!
FLOSS really rocks, congratulations on the great job you are doing
No branches or pull requests
I have the following setup in my tsconfig.json
And in my start.ts
After compiling with ttsc I get this in my start.js
It looks like it cant map the
@project/package.json
reference and just leaves it like this, without any error or warning...With
ts-transformer-imports
(commented in the tsconfig file) and with tsconfig-paths it works ok, and I get package.json mapped like this:Also tried with this configuration in tsconfig, same result:
I'm not sure if the problem is with having a reference to something outside of my baseUrl or with references to .json files
thanks a lot
The text was updated successfully, but these errors were encountered: