forked from trf2-jus-br/apoia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
65 lines (60 loc) · 2.01 KB
/
Copy pathnext.config.js
File metadata and controls
65 lines (60 loc) · 2.01 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/** @type {import('next').NextConfig} */
// const withBundleAnalyzer = require('@next/bundle-analyzer')({
// enabled: true,
// })
// /** @type {import('next').NextConfig} */
// const nextConfig = {}
// module.exports = withBundleAnalyzer(nextConfig)
const nextConfig = {
// trailingSlash: true,
output: "standalone",
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
config.module.rules.push({
test: /\.(txt|md|html)$/,
// This is the asset module.
type: 'asset/source',
})
if (isServer) {
config.externals = [
...config.externals,
{
// Possible drivers for knex - we'll ignore them
// comment the one YOU WANT to use
sqlite3: 'sqlite3',
// mysql2: 'mysql2', // << using this one
mariasql: 'mariasql',
mysql: 'mysql',
mssql: 'mssql',
oracle: 'oracle',
'strong-oracle': 'strong-oracle',
oracledb: 'oracledb',
pg: 'pg',
'pg-query-stream': 'pg-query-stream',
"pdfjs-dist/build/pdf.worker.min.js": "pdfjs-dist/build/pdf.worker.min.js"
}
]
}
// if (!isServer) {
// config.plugins.push(
// new webpack.ContextReplacementPlugin(
// /knex\/lib\/migrations\/util/,
// (context) => {
// // Remove the critical dependency warning
// delete context.dependencies[0].critical;
// }
// )
// );
// }
return config
},
experimental: {
instrumentationHook: true,
},
// experimental: {
// staleTimes: {
// dynamic: 0,
// static: 180,
// },
// },
}
module.exports = nextConfig