-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathnext.config.js
More file actions
26 lines (22 loc) · 778 Bytes
/
next.config.js
File metadata and controls
26 lines (22 loc) · 778 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
/** @type {import('next').NextConfig} */
const path = require('path');
const exec = require('child_process');
const withSvgr = require('next-plugin-svgr');
const packageInfo = require('./package.json');
const nextConfig = withSvgr({
reactStrictMode: false,
poweredByHeader: false,
webpack: config => {
config.resolve.alias['@'] = path.resolve(__dirname);
return config;
},
});
if (packageInfo.dbAdaptor === 'soul' || packageInfo.devDependencies['soul-cli']) {
if (!packageInfo.devDependencies['soul-cli']) {
console.log('running npm install -D soul-cli');
exec.execSync('npm install -D soul-cli');
}
console.log('starting soul-cli');
exec.exec('soul -d data/sqlite.db -p 3001');
}
module.exports = nextConfig;