5666b8f8e4
* chore: add custom export executor for next app * chore: update tsconfig path for export executor
23 lines
633 B
TypeScript
23 lines
633 B
TypeScript
import type { ExecutorContext } from '@nrwl/devkit';
|
|
import setup from '../../../utils/setup-environment';
|
|
import nextExportExecutor from '@nrwl/next/src/executors/export/export.impl';
|
|
import { NextExportBuilderOptions } from '@nrwl/next/src/utils/types';
|
|
|
|
type Schema = NextExportBuilderOptions & {
|
|
env: string;
|
|
};
|
|
|
|
export default async function exportWithEnv(
|
|
options: Schema,
|
|
context: ExecutorContext
|
|
) {
|
|
const { env, ...nextOptions } = options;
|
|
await setup(env, context, 'tools/executors/next/export');
|
|
|
|
try {
|
|
return await nextExportExecutor(nextOptions, context);
|
|
} catch (err) {
|
|
console.error(err);
|
|
}
|
|
}
|