I\'m trying to import a module as import Something from \"@module\", but it returns
Cannot find module \'@config\'
\"@m
Note that the import will seem fine while developing by importing moment this way, but you may get an AOT error when doing a prod compile, something like, "can not use reference" or some such like that. To not elaborate over much, this has to do (as I understand it) with some CommonJS modules. Moment is very popular, so it seems to come up quite a bit.
To get around that one (which I ran into a couple of weeks ago), set "moment" to a const:
import * as moment from 'moment':
(later where you declare consts)
const _moment = moment;
And then you use _moment in your code.