merchant-backoffice

ZZZ: Inactive/Deprecated
Log | Files | Refs | Submodules | README

commit 1621cb765a5a62c1306e9f9e3969aa6f62b649ed
parent 3860d8fd162a019a99f08759856d6b6e8e3985e6
Author: Sebastian <sebasjm@gmail.com>
Date:   Tue, 29 Jun 2021 14:05:51 -0300

fix build single html file

Diffstat:
Mpackages/frontend/preact.config.js | 51++++++++++++++++++++++++++++++---------------------
1 file changed, 30 insertions(+), 21 deletions(-)

diff --git a/packages/frontend/preact.config.js b/packages/frontend/preact.config.js @@ -27,7 +27,7 @@ import * as cp from 'child_process'; const commitHash = cp.execSync('git rev-parse --short HEAD').toString(); export default { - webpack(config, env) { + webpack(config, env, helpers) { // ensure that process.env will not be undefined on runtime config.node.process = 'mock' @@ -38,25 +38,33 @@ export default { }), ); - // allow import for gettext files - // config.resolve.extensions.push('.po'); - // transform .po format into messageformat - // config.module.rules.push({ - // enforce: 'pre', - // test: /\.po$/, - // use: [{ - // loader: 'messageformat-po-loader', - // options: { - // biDiSupport: false, - // defaultCharset: null, - // defaultLocale: 'en', - // forceContext: false, - // pluralFunction: null, - // verbose: false - // } - // }], - // }); - - // config.plugins.push(new I18n()) + // suddenly getting out of memory error from build process, error below [1] + // FIXME: remove preact-cli, use rollup + let { index } = helpers.getPluginsByName(config, 'WebpackFixStyleOnlyEntriesPlugin')[0] + config.plugins.splice(index, 1) } } + + + +/* [1] from this error decided to remove plugin 'webpack-fix-style-only-entries + leaving this error for future reference + + +<--- Last few GCs ---> + +[32479:0x2e01870] 19969 ms: Mark-sweep 1869.4 (1950.2) -> 1443.1 (1504.1) MB, 497.5 / 0.0 ms (average mu = 0.631, current mu = 0.455) allocation failure scavenge might not succeed +[32479:0x2e01870] 21907 ms: Mark-sweep 2016.9 (2077.9) -> 1628.6 (1681.4) MB, 1596.0 / 0.0 ms (average mu = 0.354, current mu = 0.176) allocation failure scavenge might not succeed + +<--- JS stacktrace ---> + +==== JS stack trace ========================================= + + 0: ExitFrame [pc: 0x13cf099] +Security context: 0x2f4ca66c08d1 <JSObject> + 1: /* anonymous * / [0x35d05555b4b9] [...path/merchant-backoffice/node_modules/.pnpm/webpack-fix-style-only-entries@0.5.2/node_modules/webpack-fix-style-only-entries/index.js:~80] [pc=0x2145e699d1a4](this=0x1149465410e9 <GlobalObject Object map = 0xff481b5b5f9>,0x047e52e36a49 <Dependency map = 0x1ed1fe41cd19>) + 2: arguments adaptor frame: 3... + +FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory + +*/ +\ No newline at end of file