Skip to content

Commit 9f55780

Browse files
committed
Fix a bug that broke backwards compatibility with v0.4.0
1 parent 4b1ad6b commit 9f55780

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ You also need to modify the `output` section of your `webpack.config.js` so that
328328
```javascript
329329
module.exports = {
330330
output: {
331-
filename: chunkData => awsSamPlugin.filename(chunkData),
331+
filename: (chunkData) => awsSamPlugin.filename(chunkData),
332332
libraryTarget: "commonjs2",
333333
path: path.resolve(".")
334334
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-sam-webpack-plugin",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Webpack plugin to replace the AWS SAM CLI build command",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class AwsSamPlugin {
110110
});
111111

112112
// Add the entry point for webpack
113-
const entryPointName = `${projectKey}#${resourceKey}`;
113+
const entryPointName = projectKey === "default" ? resourceKey : `${projectKey}#${resourceKey}`;
114114
this.entryPoints[entryPointName] = fileBase;
115115
samConfig.Resources[resourceKey].Properties.CodeUri = resourceKey;
116116
samConfig.Resources[resourceKey].Properties.Handler = `app.${handlerComponents[1]}`;

0 commit comments

Comments
 (0)