fix: babel config merging
This commit is contained in:
parent
8a602a477d
commit
958f3b80a1
|
@ -188,7 +188,7 @@ export default class ServerFlecks extends Flecks {
|
|||
if (needCompilation.length > 0) {
|
||||
const register = R('@babel/register');
|
||||
// Augment the compiler with babel config from flecksrc.
|
||||
const rcBabelConfig = babelmerge(...this.babel(rcs).map(([, babel]) => babel));
|
||||
const rcBabelConfig = babelmerge.all(this.babel(rcs).map(([, babel]) => babel));
|
||||
debug('.flecksrc: babel: %O', rcBabelConfig);
|
||||
// Key flecks needing compilation by their roots, so we can compile all common roots with a
|
||||
// single invocation of `@babel/register`.
|
||||
|
@ -566,7 +566,7 @@ export default class ServerFlecks extends Flecks {
|
|||
const babel = {
|
||||
configFile,
|
||||
// Augment the compiler with babel config from flecksrc.
|
||||
...babelmerge(...rcBabel.map(([, babel]) => babel)),
|
||||
...babelmerge.all(rcBabel.map(([, babel]) => babel)),
|
||||
};
|
||||
compileLoader({
|
||||
ignore: [sourceroot],
|
||||
|
|
|
@ -16,12 +16,12 @@ const config = require('../../../../core/src/bootstrap/fleck.neutrinorc');
|
|||
module.exports = async (flecks) => {
|
||||
// Compile.
|
||||
const rcBabel = flecks.babel();
|
||||
debug('.flecksrc: babel: %O', rcBabel);
|
||||
debug('.flecksrc: babel: %j', rcBabel);
|
||||
config.use.push(fleck({
|
||||
babel: babelmerge(
|
||||
babel: babelmerge.all([
|
||||
{configFile: flecks.buildConfig('babel.config.js')},
|
||||
...rcBabel.map(([, babel]) => babel),
|
||||
),
|
||||
]),
|
||||
}));
|
||||
config.use.push(({config}) => {
|
||||
config.stats(flecks.get('@flecks/fleck/server.stats'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user