-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Out of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraints
Description
Hello - Hope it's OK that I ask this question here. I first posted it to SO and have seen similar questions asked without answers. This is the SO question:
In addition I created a small project with a directory structure like this:
├── package.json
├── src
│ ├── boo.ts
│ └── foo
│ └── foo.ts
├── target
│ ├── boo.d.ts
│ ├── boo.js
│ └── foo
│ ├── foo.d.ts
│ └── foo.js
└── tsconfig.json
I setup the `baseUrl` and `paths` option like this:
"baseUrl": "./",
"paths": {
"@fireflysemantics/*": [ "src/*" ]
},
In this case `boo` imports `foo` and when compiled the import looks like this:
"use strict";
exports.__esModule = true;
var foo_1 = require("@fireflysemantics/foo/foo");
function boo() {
console.log("The boo is loose");
foo_1.foo();
}
exports.boo = boo;
So as you can see the `require` is still importing from the @fireflysemantics alias defined in the `tsconfig`. However when published to NPM, node does not necessarily know where that is. Thoughts?
nixxquality, grrowl, neodon, mbriziarelli, ahstro and 11 more
Metadata
Metadata
Assignees
Labels
Out of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraints