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
|
const HtmlIncludeAssetsPlugin = require("html-webpack-include-assets-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = { externals: { cesium: "Cesium" }, plugins: { new CopyWebpackPlugin([ { from: "node_modules/cesium/Build/CesiumUnminified", to: "cesium" } ]), new HtmlIncludeAssetsPlugin({ append: false, assets: [ "cesium/Widgets/widgets.css", "cesium/Cesium.js" ] }), new webpack.DefinePlugin({ "process.env": { CESIUM_BASE_URL: JSON.stringify("/cesium") } }), } }
|