Made polyfill route more flexible
This commit is contained in:
@@ -5,14 +5,14 @@ const worker_1 = require("threads/worker");
|
||||
const fs = require("fs");
|
||||
const polyfill_analyzer_1 = require("@10xjs/polyfill-analyzer");
|
||||
const polyfills_1 = require("@10xjs/polyfill-analyzer/dist/polyfills");
|
||||
worker_1.expose(() => {
|
||||
worker_1.expose((fileToWatch) => {
|
||||
const exclude = [
|
||||
"console.markTimeline",
|
||||
"console.timeline",
|
||||
"console.timelineEnd",
|
||||
];
|
||||
const featureList = polyfill_analyzer_1.analyze({
|
||||
source: fs.readFileSync('./public/js/bundle.js', 'utf-8'),
|
||||
source: fs.readFileSync(fileToWatch, 'utf-8'),
|
||||
include: polyfills_1.default.filter(x => !exclude.includes(x)),
|
||||
// Not all features listed by polyfillLibrary.listAllPolyfills()` can be detected.
|
||||
unsupportedPolyfill: 'ignore',
|
||||
|
||||
Reference in New Issue
Block a user