Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

give module id an invalid name to prevent invalid replacement #3546

Merged
merged 4 commits into from
Jan 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update packages/adapter-netlify/index.js
  • Loading branch information
Rich-Harris committed Jan 26, 2022
commit 0e2563912a2adefea1e97004fdfeea4ce7e453ba
2 changes: 1 addition & 1 deletion packages/adapter-netlify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function ({ split = false } = {}) {
const redirects = [];

const replace = {
'0APP': './server/app.js'
'0APP': './server/app.js' // digit prefix prevents CJS build from using this as a variable name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i might add a bit more detail

Suggested change
'0APP': './server/app.js' // digit prefix prevents CJS build from using this as a variable name
'0APP': './server/app.js' // digit prefix prevents CJS build from using this as a variable name to ensure replace doesn't replace occurrences of variables with this string

Rich-Harris marked this conversation as resolved.
Show resolved Hide resolved
};

if (esm) {
Expand Down