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/.
This commit is contained in:
David Lechner
2022-05-18 12:15:30 -05:00
parent c4c8da967c
commit 3235d32dbb
+2
View File
@@ -337,6 +337,8 @@ module.exports = function (webpackEnv) {
babelRuntimeEntry,
babelRuntimeEntryHelpers,
babelRuntimeRegenerator,
require.resolve('@babel/runtime/regenerator'),
require.resolve('@babel/runtime/helpers/esm/objectSpread2'),
]),
],
},