Skip to content

Commit 4c0cc0e

Browse files
committed
Replace the remaining require call and set the compilation target to ES2015
Current failure: ``` * What went wrong: Execution failed for task ':compose-multiplatform-html-unified-demo:jsBrowserProductionWebpack'. > assets by status 8.48 MiB [cached] 12 assets orphan modules 5.1 MiB [orphan] 326 modules runtime modules 2.59 KiB 8 modules cacheable modules 6.77 MiB (javascript) 5.42 MiB (asset) javascript modules 6.77 MiB modules with warnings 6.75 MiB [true warnings] 17 modules modules by path ../../node_modules/style-loader/dist/runtime/*.js 5.84 KiB 6 modules modules by path ../../node_modules/css-loader/dist/runtime/*.js 3.33 KiB 3 modules ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/material-symbols/outlined.css 2.35 KiB [built] [code generated] ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/material-icons/iconfont/material-icons.css 10.6 KiB [built] [code generated] asset modules 5.42 MiB (asset) 462 bytes (javascript) modules by path ../../node_modules/material-icons/iconfont/*.woff2 790 KiB (asset) 210 bytes (javascript) 5 modules modules by path ../../node_modules/material-icons/iconfont/*.woff 1 MiB (asset) 210 bytes (javascript) ../../node_modules/material-icons/iconfont/material-icons.woff 161 KiB (asset) 42 bytes (javascript) [built] [code generated] + 4 modules ../../node_modules/material-symbols/material-symbols-outlined.woff2 3.65 MiB (asset) 42 bytes (javascript) [built] [code generated] webpack 5.101.3 compiled with 1 error and 155 warnings in 12930 ms ```
1 parent 6fefc94 commit 4c0cc0e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

buildSrc/src/main/kotlin/common-conventions.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ kotlin {
3838
js {
3939
// The project works without this, but it can be added to avoid potential issues.
4040
browser()
41+
42+
compilerOptions {
43+
target.set("es2015")
44+
}
4145
}
4246

4347

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package com.huanshankeji.compose.material.demo
22

3-
import com.huanshankeji.compose.html.material3.require
43
import com.huanshankeji.compose.ui.window.renderComposableInBodyWithViewModelStoreOwner
54

5+
@JsModule("material-symbols/outlined.css")
6+
private external object MaterialSymbolsOutlinedImport
7+
68
fun main() {
7-
require("material-symbols/outlined.css")
9+
MaterialSymbolsOutlinedImport
810
//renderComposableInBody { App() } // "No ViewModelStoreOwner was provided via LocalViewModelStoreOwner"
911
renderComposableInBodyWithViewModelStoreOwner { App() }
1012
}

0 commit comments

Comments
 (0)