-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
62 lines (57 loc) · 1.64 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
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
import path from 'path'
import {fileURLToPath} from 'url'
import CopyPlugin from "copy-webpack-plugin";
import {merge} from "webpack-merge";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
/** @type {import('next').NextConfig} */
let nextConfig = {
output: 'standalone',
reactStrictMode: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx'],
experimental: {
esmExternals: true,
},
webpack: function (config) {
// config.plugins.push(
// new CopyPlugin({
// patterns: [
// {from: "node_modules/@pnnh/stele/lib/assets", to: "static/modules/@pnnh/stele/lib/assets"},
// ],
// }),
// )
// const originalEntry = config.entry;
//
// config.entry = async () => {
// const entries = await originalEntry();
//
// return {
// ...entries,
// 'worker/main': {
// import: path.resolve(__dirname, 'src/worker/main.ts'),
// dependOn: undefined,
// },
// };
// };
return config;
},
images: {
remotePatterns: [
{
hostname: 'localhost'
},
{
hostname: '127.0.0.1'
},
{
hostname: 'huable.xyz'
}
]
},
compress: process.env.NODE_ENV === 'production',
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
silenceDeprecations: ['legacy-js-api'],
}
}
export default nextConfig