mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user