Skip to content

Conversation

@sephialaureenciaa
Copy link

↪️ Pull Request

Closes #9001

Before this PR, parcel will throw an error when target name contains slash. To fix this, we wrap targetName with encodeJSONKeyComponent so that the slash gets encoded properly.

💻 Examples

    "/dist/server_commonjs": {
      "isLibrary": true,
      "source": "src/index.ts",
      "optimize": false,
      "context": "node",
      "outputFormat": "commonjs",
      "distDir": "dist/server/commonjs"
    }

Previously, this error would pop up:
Error: Cannot use 'in' operator to search for 'key' in undefined

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If a target name contains a slash, parcel fails with a hard-to-diagnose error message

1 participant