Add ES modules instructions in browser docs (#6268)

* Add ES6 instructions in browser docs

* Change ES6 to ES6 Modules in browser docs

Co-Authored-By: Jed Fox <git@twopointzero.us>

* Run prettier --write docs/browser.md
master
Bruno Quaresma 2019-07-05 02:41:07 -03:00 committed by Simon Lydell
parent 9721f88337
commit da0c6faeda
1 changed files with 12 additions and 0 deletions

View File

@ -24,6 +24,18 @@ prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
</script>
```
### ES Modules
```js
import prettier from "prettier/standalone";
import parserGraphql from "prettier/parser-graphql";
prettier.format("query { }", {
parser: "graphql",
plugins: [parserGraphql]
});
```
### AMD
```js