mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
WIP to run rollup twice, first with vite and babel, then to inline deps
This commit is contained in:
parent
122528f9a9
commit
36a982f7e2
@ -103,14 +103,14 @@ async function buildLegacyChunk(root, chunkName, code) {
|
|||||||
// compile down to whatever IE 11 needs
|
// compile down to whatever IE 11 needs
|
||||||
const babelPlugin = babel({
|
const babelPlugin = babel({
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
filter: filterModule,
|
|
||||||
extensions: [".js", ".ts"],
|
extensions: [".js", ".ts"],
|
||||||
babelHelpers: 'bundled',
|
babelHelpers: 'bundled',
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
"@babel/preset-env",
|
"@babel/preset-env",
|
||||||
{
|
{
|
||||||
useBuiltIns: "entry",
|
modules: false,
|
||||||
|
useBuiltIns: "usage",
|
||||||
corejs: "3.4",
|
corejs: "3.4",
|
||||||
targets: "IE 11",
|
targets: "IE 11",
|
||||||
// we provide our own promise polyfill (es6-promise)
|
// we provide our own promise polyfill (es6-promise)
|
||||||
@ -147,11 +147,12 @@ async function buildLegacyChunk(root, chunkName, code) {
|
|||||||
assetsInlineLimit: 0,
|
assetsInlineLimit: 0,
|
||||||
polyfillModulePreload: false,
|
polyfillModulePreload: false,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
external: id => !filterModule(id),
|
||||||
input: {
|
input: {
|
||||||
[chunkName]: VIRTUAL_ENTRY
|
[chunkName]: VIRTUAL_ENTRY
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
format: "iife",
|
format: "es",
|
||||||
manualChunks: undefined
|
manualChunks: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user