google / google/closure-compiler

Cannot import goog.modules from an ES6 module

Open
#1,877 8 comments 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

The following code works if `foo` is a `goog.provide` or a `goog.module` with `goog.module.declareLegacyNamespace`, but fails to compile if it is an ordinary `goog.module`:

``` js
import {foo} from 'goog:foo';
```

The error that shows up is

```
es6.js:1: ERROR - required "foo" namespace never provided
import {foo} from 'goog:foo';
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.