-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathnext.config.js
52 lines (46 loc) · 1.29 KB
/
next.config.js
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
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const withSvgr = require('next-plugin-svgr');
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, context) => {
config.module.rules.push({
test: /\/widgets-manifest\.ts$/,
use: [
context.defaultLoaders.babel,
{
loader: require.resolve('./packages/buildtool/dist/webpack/loaders/widgets-manifest')
},
]
}, {
test: /\.sql$/,
use: [
context.defaultLoaders.babel,
{
loader: require.resolve('./packages/buildtool/dist/webpack/loaders/sql')
},
]
})
config.plugins.push(new (require('./packages/buildtool/dist/webpack/plugins/db/SQLPlugin')))
config.plugins.push(new MonacoWebpackPlugin({
languages: ['mysql', 'markdown'],
}))
config.resolve.alias['roughjs'] = 'roughjs/bundled/rough.esm.js'
config.externals.push('@napi-rs/canvas')
return config;
},
svgrOptions: {
ref: true,
svgo: false,
replaceAttrValues: {
fill: 'currentColor',
},
},
onDemandEntries: {},
experimental: {
appDir: true,
// typedRoutes: true,
serverComponentsExternalPackages: ["mysql2"],
serverActions: true,
},
}
module.exports = withSvgr(nextConfig)