forked from codergautam/worldguessr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
70 lines (65 loc) · 2.24 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// const path = require('path');
// const process = require('process');
// const CopyWebpackPlugin = require('copy-webpack-plugin');
import path from 'path';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import process from 'process';
const pathBuilder = (subpath) => path.join(process.cwd(), subpath);
// const { i18n } = require('./next-i18next.config')
// import i18n from './next-i18next.config.js';
const __dirname = path.resolve();
/** @type {import('next').NextConfig} */
const nextConfig = {
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
webpack: (config, { webpack }) => {
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: pathBuilder ('node_modules/cesium/Build/Cesium/Workers'),
to: '../public/cesium/Workers',
info: { minimized: true }
}
]
}),
new CopyWebpackPlugin({
patterns: [
{
from: pathBuilder ('node_modules/cesium/Build/Cesium/ThirdParty'),
to: '../public/cesium/ThirdParty',
info: { minimized: true }
}
]
}),
new CopyWebpackPlugin({
patterns: [
{
from: pathBuilder ('node_modules/cesium/Build/Cesium/Assets'),
to: '../public/cesium/Assets',
info: { minimized: true }
}
]
}),
new CopyWebpackPlugin({
patterns: [
{
from: pathBuilder ('node_modules/cesium/Build/Cesium/Widgets'),
to: '../public/cesium/Widgets',
info: { minimized: true }
}
]
}),
new webpack.DefinePlugin({ CESIUM_BASE_URL: JSON.stringify('/cesium') })
);
return config
},
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
output: 'standalone'
};
// module.exports = nextConfig;
export default nextConfig;