-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
30 lines (27 loc) · 917 Bytes
/
next.config.js
File metadata and controls
30 lines (27 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const ESLintPlugin = require('eslint-webpack-plugin')
const computePath = require('./utils').computePath
module.exports = {
webpack(config, options) {
config.plugins.push(
new ESLintPlugin({
extensions: ['ts', 'tsx'],
exclude: ['/node_modules/', '/.next/'],
})
)
config.resolve.alias = {
...config.resolve.alias,
components: computePath('./src/components/'),
hooks: computePath('./src/components/hooks'),
pages: computePath('./src/pages/'),
pagesContent: computePath('./src/pagesContent/'),
public: computePath('./public/'),
routes: computePath('./src/routes.ts'),
stitches: computePath('./src/styles/stitches.config.ts'),
stores: computePath('./src/stores/'),
styles: computePath('./src/styles'),
types: computePath('./src/types/'),
utils: computePath('./src/utils'),
}
return config
},
}