Skip to content

Commit

Permalink
fix js build
Browse files Browse the repository at this point in the history
  • Loading branch information
luca992 committed Feb 5, 2024
1 parent a9df57b commit 4c3a466
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gradle/pack-library-resources.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val rootProjectAbsPath = rootProject.projectDir.absolutePath
val path = """"$rootProjectAbsPath/sample/build/generated/moko/jsMain/iomichaelrockslibphonenumbersample/res""""
val path = """"$rootProjectAbsPath/sample/build/generated/moko-resources/jsMain/res""""
val webpackConfig = File(projectDir, "webpack.config.d/pack-library-resources-generated.js")

fun createWebpackConfig() {
Expand All @@ -10,7 +10,7 @@ const mokoResourcePath = path.resolve($path);
config.module.rules.push({
test: /(ShortNumberMetadataProto_|PhoneNumberMetadataProto_|PhoneNumberAlternateFormatsProto_)[^.]+${'$'}/,
include: [
path.resolve(mokoResourcePath, "files"),
path.resolve(mokoResourcePath, "assets"),
],
type: 'asset/inline',
generator: {
Expand Down
4 changes: 2 additions & 2 deletions gradle/pack-library-test-resources.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val rootProjectAbsPath = rootProject.projectDir.absolutePath
val path = """"$rootProjectAbsPath/libphonenumber/build/generated/moko/jsMain/iomichaelrockslibphonenumber/res""""
val path = """"$rootProjectAbsPath/libphonenumber/build/generated/moko-resources/jsMain/res""""
val webpackConfig = File(projectDir, "webpack.config.d/pack-library-resources-generated.js")

fun createWebpackConfig() {
Expand All @@ -10,7 +10,7 @@ const mokoResourcePath = path.resolve($path);
config.module.rules.push({
test: /(ShortNumberMetadataProto_|PhoneNumberMetadataProto_|PhoneNumberMetadataProtoForTesting_|PhoneNumberAlternateFormatsProto_)[^.]+${'$'}/,
include: [
path.resolve(mokoResourcePath, "files"),
path.resolve(mokoResourcePath, "assets"),
],
type: 'asset/inline',
generator: {
Expand Down

0 comments on commit 4c3a466

Please sign in to comment.