question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Root imports

See original GitHub issue

Are root import supported? I.e. instead of: import { Foo } from "../../../entities"

you could do:

import { Foo } from "@/entities".

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
pjo336commented, May 30, 2019

Hey, I don’t think it’s entirely must have. I am just taking Foal for a spin, and trying out things we do at my work. We actually have people who love it, and people who hate it, so I wouldn’t want to force it into your app when a user can just add it themselves.

We do this using module-alias lib to alter the routes at run (ts-node) and build time. Probably not the safest operation 😛

0reactions
LoicPoullaincommented, Jul 26, 2019

Documentation added!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ES6 import from root - javascript
js i'm able to simply do: import Loading from './components/Loading'; However, when I start to create more components, with a deeper directory struture,...
Read more >
Question Library
About importing questions into Question Library. The Question Library is a good place to store, organize, and easily access all your questions within...
Read more >
Include content/project root as an import starter
Hi! Currently I've faced a problem working with imports in two project, where one is submodule of the other. The situation is as...
Read more >
Solved Question 3 1 pts In a file called helpers.py at the
Question : Question 3 1 pts In a file called helpers.py at the root of your directory, you have a function called do_stuff()....
Read more >
NgModule FAQ
This page answers the questions many developers ask about NgModule design and implementation. ... Import BrowserModule only in the root AppModule .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found