Skip to content

Commit c65e7bd

Browse files
committed
Conditionally include Cesium bundle in the HTML host page
1 parent 902ba04 commit c65e7bd

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

config/webpack.config.prod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ module.exports = {
198198
new HtmlWebpackPlugin({
199199
inject: true,
200200
template: paths.appHtml,
201+
production : true,
201202
minify: {
202203
removeComments: true,
203204
collapseWhitespace: true,

public/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
</head>
1818
<body>
1919
<div id="root"></div>
20+
<% if(htmlWebpackPlugin.options.production) { %>
21+
<script src="cesium/cesiumDll.js"></script>
22+
<% } %>
2023
<!--
2124
This HTML file is a template.
2225
If you open it directly in the browser, you will see an empty page.

0 commit comments

Comments
 (0)