-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.js
More file actions
37 lines (35 loc) · 952 Bytes
/
next.config.js
File metadata and controls
37 lines (35 loc) · 952 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
31
32
33
34
35
36
37
/** @type {import('next').NextConfig} */
const nextConfig = {
// https://nextjs.org/docs/app/building-your-application/deploying/static-exports
output: 'export',
// https://stackoverflow.com/a/66573096/2487925
trailingSlash: true,
// Webpack configuration for custom file loaders
// Note: Turbopack wasn't working with these custom loaders, so not used for now
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
) => {
config.module.rules.push({
test: /\.tsv/,
use: [
{
loader: 'csv-loader',
// https://www.papaparse.com/docs#config
options: {
header: true,
dynamicTyping: true,
delimiter: '\t',
skipEmptyLines: true
}
},
],
})
config.module.rules.push({
test: /\.md/,
use: 'raw-loader'
})
return config
},
}
module.exports = nextConfig