diff --git a/.gitignore b/.gitignore index a42c540..8399051 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,8 @@ iOSInjectionProject/ # gradle properties local.properties +# moko-resources regenerates these webpack/karma config fragments on every build (verified +# byte-for-byte reproducible), so they're build output, not source. +karma.config.d/ +webpack.config.d/ + diff --git a/webApp/karma.config.d/moko-resources-generated.js b/webApp/karma.config.d/moko-resources-generated.js deleted file mode 100644 index 7ca093d..0000000 --- a/webApp/karma.config.d/moko-resources-generated.js +++ /dev/null @@ -1,21 +0,0 @@ -// workaround from https://github.com/ryanclark/karma-webpack/issues/498#issuecomment-790040818 - -const output = { - path: require("os").tmpdir() + '/' + '_karma_webpack_' + Math.floor(Math.random() * 1000000), -} - -const optimization = { - runtimeChunk: true -} - -config.set( - { - webpack: {... createWebpackConfig(), output, optimization}, - files: config.files.concat([{ - pattern: `${output.path}/**/*`, - watched: false, - included: false, - }] - ) - } -) \ No newline at end of file diff --git a/webApp/webpack.config.d/moko-resources-generated.js b/webApp/webpack.config.d/moko-resources-generated.js deleted file mode 100644 index ec85a79..0000000 --- a/webApp/webpack.config.d/moko-resources-generated.js +++ /dev/null @@ -1,39 +0,0 @@ -// noinspection JSUnnecessarySemicolon -;(function(config) { - const path = require('path'); - const MiniCssExtractPlugin = require('mini-css-extract-plugin'); - - config.module.rules.push( - { - test: /\.(.*)/, - resource: [ - path.resolve(__dirname, "kotlin/assets"), - path.resolve(__dirname, "kotlin/files"), - path.resolve(__dirname, "kotlin/images"), - path.resolve(__dirname, "kotlin/localization"), - ], - type: 'asset/resource' - } - ); - - config.plugins.push(new MiniCssExtractPlugin()) - config.module.rules.push( - { - test: /\.css$/, - resource: [ - path.resolve(__dirname, "kotlin/fonts"), - ], - use: ['style-loader', 'css-loader'] - } - ) - - config.module.rules.push( - { - test: /\.(otf|ttf)?$/, - resource: [ - path.resolve(__dirname, "kotlin/fonts"), - ], - type: 'asset/resource', - } - ) -})(config); \ No newline at end of file