From 73aa95b6d38d932d13af3c7037cbd2a58f1c421a Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Mon, 7 Sep 2020 00:09:46 +0300 Subject: [PATCH] tsconfig absolute import improved --- next.config.js | 4 ---- tsconfig.json | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/next.config.js b/next.config.js index 80d25769..b7f271fa 100644 --- a/next.config.js +++ b/next.config.js @@ -4,8 +4,4 @@ module.exports = { APP_ARTICLES_PAGE_SIZE: 24, APP_CARD_DEFAULT_IMAGE: 'https://art.shlisselburg.org/static/img/main.jpg', }, - webpack(config) { - config.resolve.modules.push(__dirname) - return config; - }, } diff --git a/tsconfig.json b/tsconfig.json index eae685ae..cd2744af 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,11 @@ { "compilerOptions": { "baseUrl": ".", + "paths": { + "@/*": [ + "src/*" + ] + }, "target": "es5", "lib": [ "dom",