From f62d23c9bc888da7a1f029efa62f2603dbe4418f Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 22 Aug 2023 03:36:49 -0700 Subject: [PATCH] Added alias for public folder. --- jsconfig.json | 5 +---- next.config.js | 3 +++ tsconfig.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jsconfig.json b/jsconfig.json index f8124a20..738e8a46 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,8 +1,5 @@ { "compilerOptions": { - "baseUrl": "./src", - "paths": { - "public/*": ["./public/*"] - } + "baseUrl": "./src" } } diff --git a/next.config.js b/next.config.js index 2165a6e0..4ab77510 100644 --- a/next.config.js +++ b/next.config.js @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-var-requires */ require('dotenv').config(); +const path = require('path'); const pkg = require('./package.json'); const contentSecurityPolicy = ` @@ -92,6 +93,8 @@ const config = { use: ['@svgr/webpack'], }); + config.resolve.alias['public'] = path.resolve('./public'); + return config; }, async headers() { diff --git a/tsconfig.json b/tsconfig.json index 78b225f4..0faf5fbc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,7 +21,7 @@ "strictNullChecks": false, "noEmit": true, "jsx": "preserve", - "incremental": true + "incremental": false }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules"]