RobotsAndPencils / react-gantry

R&P's React Starter Kit
4 stars 1 forks source link

Src Resolver #36

Closed akrigline closed 6 years ago

akrigline commented 6 years ago

QOL change that turns our imports from this:

import SomeComponent from '../../components/someComponent'

to this:

import SomeComponent from 'components/someComponent'

Makes use of Webpack's config.resolve to accomplish this. Intellisense breaks normally with this configuration, unless you include a jsconfig.json telling it where the files are coming from. Jest breaks with this configuration unless you include moduleDirectories option to tell it where the files are coming from.

dfagan2 commented 6 years ago

nice!!

akrigline commented 6 years ago

Per your comment on #36 , I'm not certain that the jsconfig file here is used in anything but vsCode.

dfagan2 commented 6 years ago

i think you mean #37 ?

since there is the off chance that some other IDE looks for this file, and because its to prevent a "break" instead of add an enhancement, i'm okay with leaving it

akrigline commented 6 years ago

Right, sorry. Yeah that makes sense. It seems like jsconfig is an intellisense thing, rather than VSCode specific.