fix: eslint webpack config
This commit is contained in:
parent
978ee65c11
commit
e8042c8107
|
@ -25,12 +25,21 @@ if (FLECKS_CORE_SYNC_FOR_ESLINT) {
|
||||||
const flecks = await Build.from();
|
const flecks = await Build.from();
|
||||||
debug('bootstrapped');
|
debug('bootstrapped');
|
||||||
// Load and finalize ESLint configuration.
|
// Load and finalize ESLint configuration.
|
||||||
const eslintConfig = await require(
|
const eslintConfigPath = await flecks.resolveBuildConfig('default.eslint.config.js');
|
||||||
await flecks.resolveBuildConfig('default.eslint.config.js'),
|
const eslintConfig = await require(eslintConfigPath)(flecks);
|
||||||
)(flecks);
|
// Load build configuration.
|
||||||
const {resolve} = await require(
|
const [env, argv] = [{}, {mode: 'development'}];
|
||||||
await flecks.resolveBuildConfig('fleck.webpack.config.js'),
|
const webpackConfigPath = await flecks.resolveBuildConfig('fleck.webpack.config.js');
|
||||||
)({}, {mode: 'development'}, flecks);
|
const webpackConfigs = {
|
||||||
|
fleck: await require(webpackConfigPath)(env, argv, flecks),
|
||||||
|
};
|
||||||
|
await Promise.all(
|
||||||
|
flecks.invokeFlat('@flecks/build.config', 'fleck', webpackConfigs.fleck, env, argv),
|
||||||
|
);
|
||||||
|
await Promise.all(
|
||||||
|
flecks.invokeFlat('@flecks/build.config.alter', webpackConfigs, env, argv),
|
||||||
|
);
|
||||||
|
const {resolve} = webpackConfigs.fleck;
|
||||||
eslintConfig.settings['import/resolver'].webpack = {config: {resolve}};
|
eslintConfig.settings['import/resolver'].webpack = {config: {resolve}};
|
||||||
// Write it out to stdout.
|
// Write it out to stdout.
|
||||||
process.stdout.write(JSON.stringify(eslintConfig, null, 2));
|
process.stdout.write(JSON.stringify(eslintConfig, null, 2));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user