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

docs(guides) mention that only default export will work for json in w… #3141

Merged
merged 1 commit into from
Jun 24, 2019
Merged
Changes from all commits
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
10 changes: 10 additions & 0 deletions src/content/guides/asset-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,16 @@ When you open `index.html` and look at your console in your developer tools, you

T> This can be especially helpful when implementing some sort of data visualization using a tool like [d3](https://github.com/d3). Instead of making an ajax request and parsing the data at runtime you can load it into your module during the build process so that the parsed data is ready to go as soon as the module hits the browser.

W> Only the default export of JSON modules can be used without warning.

```javascript
// No warning
import data from './data.json'

// Warning shown, this is not allowed by the spec.
import { foo } from './data.json'
```


## Global Assets

Expand Down