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();
|
||||
debug('bootstrapped');
|
||||
// Load and finalize ESLint configuration.
|
||||
const eslintConfig = await require(
|
||||
await flecks.resolveBuildConfig('default.eslint.config.js'),
|
||||
)(flecks);
|
||||
const {resolve} = await require(
|
||||
await flecks.resolveBuildConfig('fleck.webpack.config.js'),
|
||||
)({}, {mode: 'development'}, flecks);
|
||||
const eslintConfigPath = await flecks.resolveBuildConfig('default.eslint.config.js');
|
||||
const eslintConfig = await require(eslintConfigPath)(flecks);
|
||||
// Load build configuration.
|
||||
const [env, argv] = [{}, {mode: 'development'}];
|
||||
const webpackConfigPath = await flecks.resolveBuildConfig('fleck.webpack.config.js');
|
||||
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}};
|
||||
// Write it out to stdout.
|
||||
process.stdout.write(JSON.stringify(eslintConfig, null, 2));
|
||||
|
|
Loading…
Reference in New Issue
Block a user