A
A
Alexander Kositsyn2018-03-01 10:07:09
JavaScript
Alexander Kositsyn, 2018-03-01 10:07:09

How to specify in package json the path to the folder in which to also search for the necessary packages by default?

import Todo from './../../../containers/Todo';
So instead of this code, just write like this
import Todo from 'containers/Todo';

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Khmyrov, 2018-03-01
@alex_keysi

https://www.npmjs.com/package/babel-plugin-module-...
here is what you need

A
alvvi, 2018-03-01
@alvvi

If Webpack, then you can look at the alias, they do exactly what you described.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question