diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-01-15 14:30:11 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-01-15 15:33:24 +0300 |
commit | 5673db93aee8b85a0344dff33454e3d7898b6f50 (patch) | |
tree | 6c7ce3d9b5f2e88474d705d2b36f88a3aa9aee14 /webpack.common.js | |
parent | 4af903f68bf079828ce7e8b5a0be58da36e5827a (diff) |
Update @babel/preset-env and fix commonjs loading
Update @babel/preset-env to 7.12.11 has revealed an issue with the event
bus library related to the CommonJS format.
The webpack config was adjusted to properly load CommonJS libraries.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/webpack.common.js b/webpack.common.js index 7c70a9e69..81466fffa 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -69,6 +69,17 @@ module.exports = { '@nextcloud/vue', 'vue-resize', ]), + options: { + plugins: ['add-module-exports'], + presets: [ + /** + * From "add-module-exports" documentation: + * "webpack doesn't perform commonjs transformation for + * codesplitting. Need to set commonjs conversion." + */ + ['@babel/env', { modules: 'commonjs' }], + ], + }, }, { /** |