Merge pull request #1860 from spotify/rugvip/config

config,config-loader: add support for suffixed config files and multiple roots
This commit is contained in:
Patrik Oldsberg
2020-08-10 11:51:07 +02:00
committed by GitHub
14 changed files with 222 additions and 63 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ 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({
env: 'production',
rootPaths: [paths.targetRoot, paths.targetDir],
});
await buildBundle({
entry: 'src/index',
statsJsonEnabled: cmd.stats,
+4 -1
View File
@@ -21,7 +21,10 @@ 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({
env: 'development',
rootPaths: [paths.targetRoot, paths.targetDir],
});
const waitForExit = await serveBundle({
entry: 'src/index',
checksEnabled: cmd.check,
+4 -1
View File
@@ -21,7 +21,10 @@ 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({
env: 'development',
rootPaths: [paths.targetRoot, paths.targetDir],
});
const waitForExit = await serveBackend({
entry: 'src/index',
checksEnabled: cmd.check,
+4 -1
View File
@@ -21,7 +21,10 @@ 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({
env: 'production',
rootPaths: [paths.targetRoot, paths.targetDir],
});
await buildBundle({
entry: 'dev/index',
statsJsonEnabled: cmd.stats,
+4 -1
View File
@@ -21,7 +21,10 @@ 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({
env: 'development',
rootPaths: [paths.targetRoot, paths.targetDir],
});
const waitForExit = await serveBundle({
entry: 'dev/index',
checksEnabled: cmd.check,