-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
36 lines (32 loc) · 1.1 KB
/
next.config.mjs
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
import withPWAInit from '@ducanh2912/next-pwa'
const withPWA = withPWAInit({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
})
/** @type {import('next').NextConfig} */
const nextConfig = {
// (Optional) Export as a static site
// See https://nextjs.org/docs/pages/building-your-application/deploying/static-exports#configuration
output: 'export', // Outputs a Single-Page Application (SPA).
distDir: './dist', // Changes the build output directory to `./dist/`.
typescript: {
ignoreBuildErrors: true,
},
compiler: {
styledComponents: true,
},
reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
// Indicate that these packages should not be bundled by webpack
serverExternalPackages: ['sharp', 'onnxruntime-web'],
// Override the default webpack configuration
webpack: (config) => {
// See https://webpack.js.org/configuration/resolve/#resolvealias
config.resolve.alias = {
...config.resolve.alias,
sharp$: false,
'onnxruntime-node$': false,
}
return config
},
}
export default withPWA(nextConfig)