Move compatibility to own entrypoint again

This commit is contained in:
Paulus Schoutsen
2020-06-03 16:24:23 -07:00
parent 2c1b25b00b
commit 3272c32f87
13 changed files with 60 additions and 24 deletions

View File

@@ -20,13 +20,7 @@ module.exports.emptyPackages = ({ latestBuild }) =>
// Loads stuff from a CDN
require.resolve("@polymer/font-roboto/roboto.js"),
require.resolve("@vaadin/vaadin-material-styles/font-roboto.js"),
// Compatibility not needed for latest builds
latestBuild &&
// wrapped in require.resolve so it blows up if file no longer exists
require.resolve(
path.resolve(paths.polymer_dir, "src/resources/compatibility.ts")
),
// This polyfill is loaded in workers to support ES5, filter it out.
// Polyfill only needed for ES5 workers so filter out in latestBuild
latestBuild && require.resolve("proxy-polyfill/src/index.js"),
].filter(Boolean);
@@ -118,6 +112,7 @@ module.exports.config = {
authorize: "./src/entrypoints/authorize.ts",
onboarding: "./src/entrypoints/onboarding.ts",
core: "./src/entrypoints/core.ts",
compatibility: "./src/entrypoints/compatibility.ts",
"custom-panel": "./src/entrypoints/custom-panel.ts",
},
outputPath: outputPath(paths.app_output_root, latestBuild),
@@ -132,6 +127,10 @@ module.exports.config = {
return {
entry: {
main: path.resolve(paths.demo_dir, "src/entrypoint.ts"),
compatibility: path.resolve(
paths.polymer_dir,
"src/entrypoints/compatibility.ts"
),
},
outputPath: outputPath(paths.demo_output_root, latestBuild),
publicPath: publicPath(latestBuild),