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
Yeah its related overall. @thelgevold we need to make essentially a property that allows this for all the preprocessers we support (behind the scenes).
Thanks @TheLarkInn .
I wonder if there might be a similar issue when dealing with paths in tsconfig.json.
paths was added in TS 1.9 and is a way to create an alias to avoid long relative import paths.
If I run tsc my code compiles, but during ng build I get module not found errors, so I suspect the paths have to be "ferried" into the webpack world somehow?
@thelgevold The webpack specific method is to prefix the name of the package with a ~.
For example, @import "~some-path/less/file";
This is probably not the long-term solution, but might get you up and running.
For sass/scss, there is https://github.com/lucasmotta/sass-module-importer. It supports reading a module's package.json which allows a simple @import "<package-name>". This would allow sass/scss to mimic the typescript workflow of npm install and import.
Activity
filipesilva commentedon Jul 29, 2016
Possibly related #1465
I don't have an answer for this at the moment. @TheLarkInn can you advise if there's a solution right now?
TheLarkInn commentedon Jul 29, 2016
Yeah its related overall. @thelgevold we need to make essentially a property that allows this for all the preprocessers we support (behind the scenes).
thelgevold commentedon Jul 29, 2016
Thanks @TheLarkInn .
I wonder if there might be a similar issue when dealing with
pathsin tsconfig.json.pathswas added in TS 1.9 and is a way to create an alias to avoid long relative import paths.If I run tsc my code compiles, but during
ng buildI get module not found errors, so I suspect the paths have to be "ferried" into the webpack world somehow?sirajc commentedon Jul 29, 2016
Maybe, mapping
pathsof tsconfig toresolve.aliasof webpackclydin commentedon Aug 4, 2016
@thelgevold The webpack specific method is to prefix the name of the package with a
~.For example,
@import "~some-path/less/file";This is probably not the long-term solution, but might get you up and running.
TheLarkInn commentedon Aug 4, 2016
Yeah this is great in webpack land but not user land.
clydin commentedon Aug 4, 2016
For sass/scss, there is https://github.com/lucasmotta/sass-module-importer. It supports reading a module's
package.jsonwhich allows a simple@import "<package-name>". This would allow sass/scss to mimic the typescript workflow ofnpm installandimport.filipesilva commentedon Jan 8, 2017
Supersedes by #1791, work in progress on #2747
angular-automatic-lock-bot commentedon Sep 6, 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.