-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnext.config.js
36 lines (33 loc) · 1.05 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
const path = require("path");
const cesiumSrc = "./node_modules/cesium/Build/CesiumUnminified";
const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = {
webpack: (config, { webpack }) => {
// Note: we provide webpack above so you should not `require` it
// Perform customizations to webpack config
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: path.join(__dirname, "node_modules/cesium/Build/Cesium/Workers"),
to: path.join(__dirname, 'Workers')
},
{
from: path.join(__dirname, "node_modules/cesium/Build/Cesium/Assets"),
to: path.join(__dirname, 'Assets')
},
{
from: path.join("node_modules/cesium/Build/Cesium/Widgets"),
to: path.join(__dirname, 'Widgets')
}
]
}));
config.plugins.push(
new webpack.DefinePlugin({
CESIUM_BASE_URL: JSON.stringify("/")
})
);
// Important: return the modified config
return config
},
}