We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6663596 commit 7e358daCopy full SHA for 7e358da
src/function.ts
@@ -42,7 +42,7 @@ export class NodejsFunction extends lambda.Function {
42
es.buildSync({
43
...buildOptions,
44
external: union(exclude, buildOptions.external || []),
45
- entryPoints: [entry],
+ entryPoints: [path.join(projectRoot,entry)],
46
outdir: path.join(projectRoot, BUILD_FOLDER, path.dirname(entry)),
47
platform: 'node',
48
});
tests/function.test.ts
@@ -7,7 +7,7 @@ import { Runtime, RuntimeFamily } from '@aws-cdk/aws-lambda';
7
import { Stack } from '@aws-cdk/core';
8
import { buildSync } from 'esbuild';
9
import mockfs from 'mock-fs';
10
-import path from 'path';
+import path,{join} from 'path';
11
12
import { NodejsFunction } from '../src';
13
@@ -56,7 +56,7 @@ describe('NodejsFunction tests', () => {
56
${'a/b/c.h'} | ${'a/b/c.ts'}
57
`('Should be valid entry with default rootDir', ({ handler, entry }) => {
58
new NodejsFunction(new Stack(), 'lambda-function', { handler });
59
- expect(buildSync).toHaveBeenCalledWith(expect.objectContaining({ entryPoints: [entry] }));
+ expect(buildSync).toHaveBeenCalledWith(expect.objectContaining({ entryPoints: [join(process.cwd(),entry)] }));
60
61
62
it('Should be valid outdir with custom rootDir', () => {
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments