-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from THEOplayer/fix-conviva-bundle-size
Fix bundle size of Conviva connector
- Loading branch information
Showing
6 changed files
with
77 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@theoplayer/conviva-connector-web": patch | ||
--- | ||
|
||
Fixed an issue where the THEOplayer library and the Yospace connector were accidentally bundled together with the Conviva connector. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,66 @@ | ||
import {defineConfig} from "rollup"; | ||
import nodeResolve from "@rollup/plugin-node-resolve"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import typescript from "@rollup/plugin-typescript"; | ||
import dts from "rollup-plugin-dts"; | ||
import { defineConfig } from 'rollup'; | ||
import nodeResolve from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import dts from 'rollup-plugin-dts'; | ||
|
||
export function getSharedBuildConfiguration(fileName, globalName, banner) { | ||
return defineConfig([{ | ||
input: { | ||
[fileName]: "src/index.ts" | ||
}, | ||
output: [ | ||
{ | ||
dir: "dist", | ||
entryFileNames: "[name].umd.js", | ||
name: globalName, | ||
format: "umd", | ||
indent: false, | ||
banner, | ||
globals: {theoplayer: "THEOplayer"} | ||
export function getSharedBuildConfiguration({ fileName, globalName, banner, external, globals }) { | ||
return defineConfig([ | ||
{ | ||
input: { | ||
[fileName]: 'src/index.ts' | ||
}, | ||
{ | ||
dir: "dist", | ||
entryFileNames: "[name].esm.js", | ||
format: "esm", | ||
indent: false, | ||
banner | ||
} | ||
], | ||
plugins: [ | ||
nodeResolve({ | ||
extensions: [".ts", ".js"] | ||
}), | ||
commonjs({ | ||
include: ['node_modules/**', '../node_modules/**'] | ||
}), | ||
typescript({ | ||
tsconfig: "tsconfig.json", | ||
module: "es2015", | ||
include: ["src/**/*"] | ||
}) | ||
] | ||
}, { | ||
input: { | ||
[fileName]: "src/index.ts" | ||
output: [ | ||
{ | ||
dir: 'dist', | ||
entryFileNames: '[name].umd.js', | ||
name: globalName, | ||
format: 'umd', | ||
indent: false, | ||
banner, | ||
globals: { theoplayer: 'THEOplayer', ...(globals ?? {}) } | ||
}, | ||
{ | ||
dir: 'dist', | ||
entryFileNames: '[name].esm.js', | ||
format: 'esm', | ||
indent: false, | ||
banner | ||
} | ||
], | ||
external: ['theoplayer', ...(external ?? [])], | ||
plugins: [ | ||
nodeResolve({ | ||
extensions: ['.ts', '.js'] | ||
}), | ||
commonjs({ | ||
include: ['node_modules/**', '../node_modules/**'] | ||
}), | ||
typescript({ | ||
tsconfig: 'tsconfig.json', | ||
module: 'es2015', | ||
include: ['src/**/*'] | ||
}) | ||
] | ||
}, | ||
output: [ | ||
{ | ||
dir: "dist", | ||
format: "esm", | ||
banner, | ||
footer: `export as namespace ${globalName};` | ||
} | ||
], | ||
plugins: [ | ||
dts({ | ||
tsconfig: "tsconfig.json", | ||
}) | ||
] | ||
}]); | ||
} | ||
{ | ||
input: { | ||
[fileName]: 'src/index.ts' | ||
}, | ||
output: [ | ||
{ | ||
dir: 'dist', | ||
format: 'esm', | ||
banner, | ||
footer: `export as namespace ${globalName};` | ||
} | ||
], | ||
external: ['theoplayer', ...(external ?? [])], | ||
plugins: [ | ||
dts({ | ||
tsconfig: 'tsconfig.json' | ||
}) | ||
] | ||
} | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters