rollup / rollup/rollup

Change the ways global variable names and output names work

Open
#2,890 6 comments 0 reactions 1 assignee View on GitHub

@shellscape is already working on this.

Since Aug 15, 2019.

s² 🔥🔥 important t³ ✨ enhancement v¹ ⋅ major
Dominant language
JavaScript
Stars
26.3k
Forks
1.8k
Avg merge
2d 11h
Merged PRs (30d)
20

Description

Expected Behavior / Situation

When I define a bundle and name it xyz.abc, I expect the bundle to be registered under window['xyz.abc'].

Actual Behavior / Situation

This is what happens instead: window.xyz.abc. Same for globals. Consider this:

globals: {
  '@namespace/package': 'namespace.package
}

This becomes window.namespace.package, instead of window['namespace.package'].

Modification Proposal

Defining name: 'namespace.package' should be compiled to window['namespace.packge']. Defining name: ['namespace', 'package'] could allow specifing the keypath, resulting in window.namespace.package.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.