Added alias for public folder.

This commit is contained in:
Mike Cao 2023-08-22 03:36:49 -07:00
parent 56ee52e349
commit f62d23c9bc
3 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,5 @@
{ {
"compilerOptions": { "compilerOptions": {
"baseUrl": "./src", "baseUrl": "./src"
"paths": {
"public/*": ["./public/*"]
}
} }
} }

View File

@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-var-requires */
require('dotenv').config(); require('dotenv').config();
const path = require('path');
const pkg = require('./package.json'); const pkg = require('./package.json');
const contentSecurityPolicy = ` const contentSecurityPolicy = `
@ -92,6 +93,8 @@ const config = {
use: ['@svgr/webpack'], use: ['@svgr/webpack'],
}); });
config.resolve.alias['public'] = path.resolve('./public');
return config; return config;
}, },
async headers() { async headers() {

View File

@ -21,7 +21,7 @@
"strictNullChecks": false, "strictNullChecks": false,
"noEmit": true, "noEmit": true,
"jsx": "preserve", "jsx": "preserve",
"incremental": true "incremental": false
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"] "exclude": ["node_modules"]