fix: work around bug in RequireContextPlugin

This commit is contained in:
cha0s 2024-01-07 15:04:18 -06:00
parent 4c72b71f4a
commit 0a79027be6
2 changed files with 4 additions and 3 deletions

View File

@ -13,10 +13,11 @@ export const hooks = {
foo: 'bar',
}),
'@flecks/core/one/test-gather': (
Flecks.provide(require.context('./things', false, /\.js$/))
// @todo We have to explicitly start the pattern with a dot due to RequireContextPlugin.
Flecks.provide(require.context('./things', false, /^\..*\.js$/))
),
'@flecks/core/one/test-gather.decorate': (
Flecks.decorate(require.context('./things/decorators', false, /\.js$/))
Flecks.decorate(require.context('./things/decorators', false, /\..*\.js$/))
),
'@flecks/core/test/invoke': () => 69,
'@flecks/core/test/invoke-parallel': (O) => {

View File

@ -2,7 +2,7 @@ import {Flecks} from '@flecks/core';
export const hooks = {
'@flecks/core/one/test-gather': (
Flecks.provide(require.context('./things', false, /\.js$/))
Flecks.provide(require.context('./things', false, /^\..*\.js$/))
),
'@flecks/core/test/invoke': () => 420,
'@flecks/core/test/invoke-parallel': (O) => new Promise((resolve) => {