Production mode by default for web

This commit is contained in:
Maximilian Ammann 2021-12-29 12:41:26 +01:00
parent 8a62b666cf
commit 8cf993c378
3 changed files with 6 additions and 2 deletions

View File

@ -28,7 +28,7 @@ pub const COLOR_TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8
#[wasm_bindgen(start)]
pub fn start() {
if let Err(_) = console_log::init_with_level(Level::Info) {
if let Err(_) = console_log::init_with_level(Level::Trace) {
// Failed to initialize logging. No need to log a message.
}
panic::set_hook(Box::new(console_error_panic_hook::hook));

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>mapr Demo</title>

View File

@ -74,7 +74,10 @@ module.exports = (env) => ({
//
// the mode `development` makes `wasm-pack` build in `debug` mode.
// the mode `production` makes `wasm-pack` build in `release` mode.
// forceMode: "production",
// TODO: We always build a production build because a development build runs slow
// TODO: The function which is slowing it down is TileProto::decode() which maps the tile proto struct
// TODO: into our data structure. (Development: 15s, Production: 60ms)
forceMode: "production",
// Controls plugin output verbosity, either 'info' or 'error'.
// Defaults to 'info'.