diff --git a/docs/browser.md b/docs/browser.md index cde9547f99..1403b29377 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -3,6 +3,12 @@ id: browser title: Browser --- +## browser status for prettierX + +This documentation does **not** apply for prettierX. The recommended solution is to use a bundler such as Rollup or Webpack. This is tracked with some more information in: [`brodybits/prettierx#95`](https://github.com/brodybits/prettierx/issues/95) + +--- + Run Prettier in the browser with the `standalone.js` UMD bundle shipped in the NPM package (starting in version 1.13). The UMD bundle only formats the code and has no support for config files, ignore files, CLI usage, or automatic loading of plugins. ### `prettier.format(code, options)` @@ -29,8 +35,8 @@ See [Usage](#usage) below for examples. ### ES Modules ```js -import prettier from "prettierx/standalone"; -import parserGraphql from "prettierx/parser-graphql"; +import prettier from "prettier/standalone"; +import parserGraphql from "prettier/parser-graphql"; prettier.format("query { }", { parser: "graphql", @@ -52,8 +58,8 @@ define([ ### CommonJS ```js -const prettier = require("prettierx/standalone"); -const plugins = [require("prettierx/parser-graphql")]; +const prettier = require("prettier/standalone"); +const plugins = [require("prettier/parser-graphql")]; prettier.format("query { }", { parser: "graphql", plugins }); ```