From dfe60598899738250fc707db91048b871ab09282 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 15 Aug 2019 17:24:45 +0200 Subject: Fix tesseract.js being part of the common chunk (#11571) * Fix tesseract.js being part of the common chunk Besides being 620 KB large, it also causes a modules-related runtime error in production... * Fix code style issue * Fix modules error --- babel.config.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'babel.config.js') diff --git a/babel.config.js b/babel.config.js index a506ad8ce..3f7ff84db 100644 --- a/babel.config.js +++ b/babel.config.js @@ -20,6 +20,12 @@ module.exports = (api) => { ['react-intl', { messagesDir: './build/messages' }], 'preval', ], + overrides: [{ + test: /tesseract\.js/, + presets: [ + ['@babel/env', { ...envOptions, modules: 'commonjs' }], + ], + }], }; switch (env) { -- cgit