Skip to content

Problem with a workaround in Webpack configs #432

@birdofpreyru

Description

@birdofpreyru

The following breaks resolution of @babel/runtime inside e2e Jest tests, as in that case the context is set to the test location, not to the codebase root, where node_modules folder is located.

// NOTE: The "conditionNames" workaround below messes up the loading of
// Babel's runtime helper for require of CJS and ES styles of modules
// (without this alias it is resolved to
// @babel/runtime/helpers/esm/interopRequireDefault, which has
// the hepler function attached to "default" export).
'@babel/runtime/helpers/interopRequireDefault': path.resolve(
o.context,
'node_modules/@babel/runtime/helpers/interopRequireDefault',
),

Metadata

Metadata

Assignees

No one assigned

    Labels

    In ProgressCurrently in works, but not clear, how many time it will get to complete.P1High priority. Important thing to focus on.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions