Skip to content

Commit

Permalink
Fixes #1374: add build support for CesiumJS in projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarto committed Jan 9, 2017
1 parent 726be96 commit d87cd35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions project/prod-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ webpackConfig.plugins = [
}),
new NormalModuleReplacementPlugin(/leaflet$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "leaflet")),
new NormalModuleReplacementPlugin(/openlayers$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "openlayers")),
new NormalModuleReplacementPlugin(/cesium$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "cesium")),
new NormalModuleReplacementPlugin(/proj4$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "proj4")),
new UglifyJsPlugin({
compress: {warnings: false},
Expand Down
5 changes: 3 additions & 2 deletions project/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
}),
new NormalModuleReplacementPlugin(/leaflet$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "leaflet")),
new NormalModuleReplacementPlugin(/openlayers$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "openlayers")),
new NormalModuleReplacementPlugin(/cesium$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "cesium")),
new NormalModuleReplacementPlugin(/proj4$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "proj4")),
new NoErrorsPlugin()
],
Expand All @@ -43,12 +44,12 @@ module.exports = {
{ test: /\.(png|jpg|gif)$/, loader: 'url-loader?name=[path][name].[ext]&limit=8192'}, // inline base64 URLs for <=8k images, direct URLs for the rest
{
test: /\.jsx?$/,
exclude: /ol\.js$/,
exclude: /(ol\.js)$|(Cesium\.js)$|(cesium\.js)$/,
loader: "react-hot",
include: [path.join(__dirname, "js"), path.join(__dirname, "MapStore2", "web", "client")]
}, {
test: /\.jsx?$/,
exclude: /ol\.js$/,
exclude: /(ol\.js)$|(Cesium\.js)$/,
loader: "babel-loader",
include: [path.join(__dirname, "js"), path.join(__dirname, "MapStore2", "web", "client")]
}
Expand Down

0 comments on commit d87cd35

Please sign in to comment.