config-loader: use multiple config roots

This commit is contained in:
Patrik Oldsberg
2020-08-07 10:37:22 +02:00
parent 032ba401af
commit 811328ed1f
8 changed files with 30 additions and 12 deletions
+3 -1
View File
@@ -21,7 +21,9 @@ import { paths } from '../../lib/paths';
import { buildBundle } from '../../lib/bundler';
export default async (cmd: Command) => {
const appConfigs = await loadConfig({ rootPath: paths.targetRoot });
const appConfigs = await loadConfig({
rootPaths: [paths.targetDir, paths.targetRoot],
});
await buildBundle({
entry: 'src/index',
statsJsonEnabled: cmd.stats,
+3 -1
View File
@@ -21,7 +21,9 @@ import { paths } from '../../lib/paths';
import { serveBundle } from '../../lib/bundler';
export default async (cmd: Command) => {
const appConfigs = await loadConfig({ rootPath: paths.targetRoot });
const appConfigs = await loadConfig({
rootPaths: [paths.targetDir, paths.targetRoot],
});
const waitForExit = await serveBundle({
entry: 'src/index',
checksEnabled: cmd.check,
+3 -1
View File
@@ -21,7 +21,9 @@ import { paths } from '../../lib/paths';
import { serveBackend } from '../../lib/bundler/backend';
export default async (cmd: Command) => {
const appConfigs = await loadConfig({ rootPath: paths.targetRoot });
const appConfigs = await loadConfig({
rootPaths: [paths.targetDir, paths.targetRoot],
});
const waitForExit = await serveBackend({
entry: 'src/index',
checksEnabled: cmd.check,
+3 -1
View File
@@ -21,7 +21,9 @@ import { paths } from '../../lib/paths';
import { buildBundle } from '../../lib/bundler';
export default async (cmd: Command) => {
const appConfigs = await loadConfig({ rootPath: paths.targetRoot });
const appConfigs = await loadConfig({
rootPaths: [paths.targetDir, paths.targetRoot],
});
await buildBundle({
entry: 'dev/index',
statsJsonEnabled: cmd.stats,
+3 -1
View File
@@ -21,7 +21,9 @@ import { paths } from '../../lib/paths';
import { serveBundle } from '../../lib/bundler';
export default async (cmd: Command) => {
const appConfigs = await loadConfig({ rootPath: paths.targetRoot });
const appConfigs = await loadConfig({
rootPaths: [paths.targetDir, paths.targetRoot],
});
const waitForExit = await serveBundle({
entry: 'dev/index',
checksEnabled: cmd.check,