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.mdmaster
parent
9721f88337
commit
da0c6faeda
|
@ -24,6 +24,18 @@ prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### ES Modules
|
||||||
|
|
||||||
|
```js
|
||||||
|
import prettier from "prettier/standalone";
|
||||||
|
import parserGraphql from "prettier/parser-graphql";
|
||||||
|
|
||||||
|
prettier.format("query { }", {
|
||||||
|
parser: "graphql",
|
||||||
|
plugins: [parserGraphql]
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
### AMD
|
### AMD
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
Loading…
Reference in New Issue