google / google/closure-compiler
IIFE isolation_mode does not work for chunks
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
I think `--isolation_mode IIFE` should have the same effect on chunks as on output files. Otherwise chunks pollute the _window_ namespace.
```js
console.log('hello world')
```
```console
java -jar compiler.jar \
--compilation_level ADVANCED \
--isolation_mode IIFE \
--js t.js \
--chunk mychunk:auto \
```
```js
// mychunk.js
console.log("hello world");
```
Although then it's not clear then how one chunk could use data from the dependency chunk... unless via google's module loading irc
Contributor guide
Assessment
This issue has not been assessed yet.