From 3235d32dbb017183ad337639cd7deb9e9491e945 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 18 May 2022 12:15:30 -0500 Subject: [PATCH] webpack: fix yarn build after 8ba4d49e Something about commit 8ba4d49e caused a few extra babel modules to trigger the ModuleScopePlugin guard. Example error: Failed to compile. Module not found: Error: You attempted to import /home/david/work/pybricks/pybricks-code/node_modules/@babel/runtime/regenerator/index.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/. --- config/webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/webpack.config.js b/config/webpack.config.js index 06c9670e..8cd89639 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -337,6 +337,8 @@ module.exports = function (webpackEnv) { babelRuntimeEntry, babelRuntimeEntryHelpers, babelRuntimeRegenerator, + require.resolve('@babel/runtime/regenerator'), + require.resolve('@babel/runtime/helpers/esm/objectSpread2'), ]), ], },