Fix PR Preview Playground (#3592)

* Fix PR Preview Playground

* Use module.exports for Prettier export

* Keep index for backwards compatibility
master
Lucas Azzola 2017-12-28 22:37:47 +11:00 committed by GitHub
parent b63c669ed9
commit b0647cb2c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -40,8 +40,14 @@ self.require = function require(path) {
return self[path];
};
var prettier;
importScripts("lib/index.js");
var prettier = index; // eslint-disable-line
if (typeof prettier === "undefined") {
prettier = module.exports; // eslint-disable-line
}
if (typeof prettier === "undefined") {
prettier = index; // eslint-disable-line
}
var parsersLoaded = {};