Skip to content

Commit

Permalink
Added alias for public folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Aug 22, 2023
1 parent 56ee52e commit f62d23c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 1 addition & 4 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"public/*": ["./public/*"]
}
"baseUrl": "./src"
}
}
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -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 = `
Expand Down Expand Up @@ -92,6 +93,8 @@ const config = {
use: ['@svgr/webpack'],
});

config.resolve.alias['public'] = path.resolve('./public');

return config;
},
async headers() {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"strictNullChecks": false,
"noEmit": true,
"jsx": "preserve",
"incremental": true
"incremental": false
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit f62d23c

Please sign in to comment.