Anyone else has experienced significantly longer w...
# javascript
r
Anyone else has experienced significantly longer webpack build cycle with 1.4.0 (legacy)? With 1.3.72 and with my workaround for KT-32273 it was about 4 seconds between code change and page hot reload in the browser. Now with 1.4 it's about 8 seconds for the same project.
Old build times reported by webpack:
Copy code
Change detected, executing build...

⚠ 「wdm」: Hash: 52dbb9ae4f74299d78458s]
Version: webpack 4.41.2
Time: 183ms
Built at: 2020-08-19 21:01:11

⚠ 「wdm」: Hash: 2e49755bf090370d1c4f19s]
Version: webpack 4.41.2
Time: 308ms
Built at: 2020-08-19 21:01:12
and with 1.4:
Copy code
Change detected, executing build...

⚠ 「wdm」: Hash: bb861759a4ad7edea8ab35s]
Version: webpack 4.42.1
Time: 1836ms
Built at: 2020-08-19 21:14:41

⚠ 「wdm」: Hash: 95a503e7000eadd68b91 39s]
Version: webpack 4.42.1
Time: 3592ms
Built at: 2020-08-19 21:14:45
I've tested the differences in webpack configuration, and it seems the delay is caused by the source map loader. In 1.3.72 very simple
kotlin-source-map-loader
was used and now we have
source-map-loader
, which obviously has support even for emojis! When I remove it from the configuration it runs fast again.
Is this new loader worth 100% longer build cycle? Can it be disabled?
I answering myself - it can:
Copy code
kotlin {
    js {
        browser {
            runTask {
                sourceMaps = false
            }
        }
    }
}