You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to configure aliases in .angular-cli.json #6282
Currently the only way I know of to import components, services, etc, from one to another using the cli's webpack configurations is using relative paths for everything. Meaning often imports can have a good number of ../../../ this makes it difficult to refactor and maintain a growing application.
Mention any other details that might be useful.
I understand ng eject is always an option, but that would also mean dropping out of the great support and configurations provided by the cli.
I tried to use this method to import the requirejs compatible version of fabric.js but then the typings of @types/fabric are not working anymore. Neither the compiler does typechecks nor does VSCode provide any information about the types.
Activity
clydin commentedon May 11, 2017
Typescript provides extensive path mapping support. Scroll down to the path mapping section here: https://www.typescriptlang.org/docs/handbook/module-resolution.html
dave11mj commentedon May 12, 2017
@clydin Thanks for the feedback !! I didn't know
tsconfig.jsonhad such power !! ^^WoMayr commentedon Aug 3, 2017
I tried to use this method to import the requirejs compatible version of fabric.js but then the typings of
@types/fabricare not working anymore. Neither the compiler does typechecks nor does VSCode provide any information about the types.My tsconfig.json:
{ "compileOnSave": false, "compilerOptions": { "outDir": "./dist/out-tsc", "baseUrl": "src", "paths": { "fabric": [ "../node_modules/fabric/dist/fabric.require.js" ] }, "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2016", "dom" ] } }Usage inside
app.component.ts:Typescript should complain about
this.canvas.toSVG()as it is wrongly defined inside the typings, but it doesn't.I have looked around the internet searching for any solutions regarding this problem but I couldn't find any.
nelisbijl commentedon Nov 29, 2018
Sure but SCSS is no TypeScript
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.