mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Ignore proxy-polyfill in workers (#6011)
This commit is contained in:
parent
c5ef33cc78
commit
38d3b8d087
@ -11,15 +11,18 @@ module.exports.ignorePackages = ({ latestBuild }) => [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Files from NPM packages that we should replace with empty file
|
// Files from NPM packages that we should replace with empty file
|
||||||
module.exports.emptyPackages = ({ latestBuild }) => [
|
module.exports.emptyPackages = ({ latestBuild }) =>
|
||||||
// Contains all color definitions for all material color sets.
|
[
|
||||||
// We don't use it
|
// Contains all color definitions for all material color sets.
|
||||||
require.resolve("@polymer/paper-styles/color.js"),
|
// We don't use it
|
||||||
require.resolve("@polymer/paper-styles/default-theme.js"),
|
require.resolve("@polymer/paper-styles/color.js"),
|
||||||
// Loads stuff from a CDN
|
require.resolve("@polymer/paper-styles/default-theme.js"),
|
||||||
require.resolve("@polymer/font-roboto/roboto.js"),
|
// Loads stuff from a CDN
|
||||||
require.resolve("@vaadin/vaadin-material-styles/font-roboto.js"),
|
require.resolve("@polymer/font-roboto/roboto.js"),
|
||||||
];
|
require.resolve("@vaadin/vaadin-material-styles/font-roboto.js"),
|
||||||
|
// Polyfill only needed for ES5 workers so filter out in latestBuild
|
||||||
|
latestBuild && require.resolve("proxy-polyfill/src/index.js"),
|
||||||
|
].filter(Boolean);
|
||||||
|
|
||||||
module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
|
module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
|
||||||
__DEV__: !isProdBuild,
|
__DEV__: !isProdBuild,
|
||||||
|
@ -25,7 +25,7 @@ const defaultOpts = {
|
|||||||
// A RegExp to find `new Workers()` calls. The second capture group _must_
|
// A RegExp to find `new Workers()` calls. The second capture group _must_
|
||||||
// capture the provided file name without the quotes.
|
// capture the provided file name without the quotes.
|
||||||
workerRegexp: /new Worker\((["'])(.+?)\1(,[^)]+)?\)/g,
|
workerRegexp: /new Worker\((["'])(.+?)\1(,[^)]+)?\)/g,
|
||||||
plugins: ["node-resolve", "commonjs", "babel"],
|
plugins: ["node-resolve", "commonjs", "babel", "terser", "ignore"],
|
||||||
};
|
};
|
||||||
|
|
||||||
async function getBundledWorker(workerPath, rollupOptions) {
|
async function getBundledWorker(workerPath, rollupOptions) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user