diff --git a/packages/polyserve/CHANGELOG.md b/packages/polyserve/CHANGELOG.md index 7b6082214..8dc0317e4 100644 --- a/packages/polyserve/CHANGELOG.md +++ b/packages/polyserve/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). +* Allow file requests to specify `?nocompile` to prevent any compilation ## [0.27.12] (2018-06-28) * Updated dependencies. diff --git a/packages/polyserve/src/compile-middleware.ts b/packages/polyserve/src/compile-middleware.ts index a5e1a3304..536438d40 100644 --- a/packages/polyserve/src/compile-middleware.ts +++ b/packages/polyserve/src/compile-middleware.ts @@ -72,6 +72,9 @@ export function babelCompile( if (isPolyfill.test(request.url)) { return false; } + if ('nocompile' in request.query) { + return false; + } if (!compileMimeTypes.includes(getContentType(response))) { return false; }