Skip to content

Commit

Permalink
Adjust config
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuwalow committed May 6, 2024
1 parent 6b75037 commit f99a5ce
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 99 deletions.
6 changes: 0 additions & 6 deletions .browserslistrc

This file was deleted.

12 changes: 4 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@ references:

npm_install: &npm_install
run:
name: Npm install
command: npm install

npm_install_additional_docker_deps: &npm_install_additional_docker_deps
run:
name: Npm install additional deps
command: npm install --no-save @rollup/rollup-linux-x64-gnu
name: Install dependencies
command: |
npm install
npm install --no-save @rollup/rollup-linux-x64-gnu
host_setup: &host_setup
run:
Expand Down Expand Up @@ -105,7 +102,6 @@ jobs:
- node/install:
node-version: << pipeline.parameters.node_version >>
- *npm_install
- *npm_install_additional_docker_deps
- *save_cache
- run:
name: Run unit tests
Expand Down
168 changes: 84 additions & 84 deletions rollup/dist.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,95 +11,95 @@ const OUTPUT_DIR = './dist'
const DECLARATION_DIR = `${OUTPUT_DIR}/dts`

const prebid = {
input: "./src/index.ts",
tsOutput: `${OUTPUT_DIR}/prebid.ts.mjs`,
babelOutput: `${OUTPUT_DIR}/prebid.babel.mjs`,
output: `${OUTPUT_DIR}/prebid.cjs`
input: "./src/index.ts",
tsOutput: `${OUTPUT_DIR}/prebid.ts.mjs`,
babelOutput: `${OUTPUT_DIR}/prebid.babel.mjs`,
output: `${OUTPUT_DIR}/prebid.cjs`
}

export default [
{
input: ['./src/index.ts', './src/internal.ts'],
output: [
{
dir: OUTPUT_DIR,
entryFileNames: '[name].cjs',
chunkFileNames: '[name]-[hash].cjs',
format: 'cjs',
sourcemap: false
},
{
dir: OUTPUT_DIR,
entryFileNames: '[name].mjs',
chunkFileNames: '[name]-[hash].mjs',
format: 'es',
sourcemap: false
}
],
plugins: [
cleaner({ targets: [OUTPUT_DIR] }),
ts({ compilerOptions: { declaration: true, declarationDir: DECLARATION_DIR } }),
strip()
],
external: [
'live-connect-common',
'tiny-hashes'
]
{
input: ['./src/index.ts', './src/internal.ts'],
output: [
{
dir: OUTPUT_DIR,
entryFileNames: '[name].cjs',
chunkFileNames: '[name]-[hash].cjs',
format: 'cjs',
sourcemap: false
},
{
dir: OUTPUT_DIR,
entryFileNames: '[name].mjs',
chunkFileNames: '[name]-[hash].mjs',
format: 'es',
sourcemap: false
}
],
plugins: [
cleaner({ targets: [OUTPUT_DIR] }),
ts({ compilerOptions: { declaration: true, declarationDir: DECLARATION_DIR } }),
strip()
],
external: [
'live-connect-common',
'tiny-hashes'
]
},
{
input: {
index: `${DECLARATION_DIR}/src/index.d.ts`,
internal: `${DECLARATION_DIR}/src/internal.d.ts`
},
{
input: {
index: `${DECLARATION_DIR}/src/index.d.ts`,
internal: `${DECLARATION_DIR}/src/internal.d.ts`
},
output: [{ dir: OUTPUT_DIR, format: 'es' }],
plugins: [dts(), del({ targets: DECLARATION_DIR, hook: 'buildEnd' })],
output: [{ dir: OUTPUT_DIR, format: 'es' }],
plugins: [dts(), del({ targets: DECLARATION_DIR, hook: 'buildEnd' })],
},
//
// prebid build
//
{
input: prebid.input,
output: {
file: prebid.tsOutput,
format: 'esm',
sourcemap: false
},
//
// prebid build
//
{
input: prebid.input,
output: {
file: prebid.tsOutput,
format: 'esm',
sourcemap: false
},
plugins: [
commonJs({ sourceMap: false }),
resolve(),
ts(),
]
plugins: [
commonJs({ sourceMap: false }),
resolve(),
ts(),
]
},
// transpile with babel
{
input: prebid.tsOutput,
output: {
file: prebid.babelOutput,
format: 'esm',
sourcemap: false
},
// transpile with babel
{
input: prebid.tsOutput,
output: {
file: prebid.babelOutput,
format: 'esm',
sourcemap: false
},
plugins: [
babel({ babelHelpers: 'runtime', configFile: './rollup/babel-prebid.json' }),
del({ targets: prebid.tsOutput, hook: 'buildEnd' })
],
external: [
/@babel\/runtime-corejs3/,
/core-js-pure/
]
},
// minify and bundle
{
input: prebid.babelOutput,
output: {
file: prebid.output,
format: 'cjs',
sourcemap: false
},
plugins: [
commonJs({ sourceMap: false }),
resolve(),
strip(),
del({ targets: prebid.babelOutput, hook: 'buildEnd' })
]
plugins: [
babel({ babelHelpers: 'runtime', configFile: './rollup/babel-prebid.json' }),
del({ targets: prebid.tsOutput, hook: 'buildEnd' })
],
external: [
/@babel\/runtime-corejs3/,
/core-js-pure/
]
},
// minify and bundle
{
input: prebid.babelOutput,
output: {
file: prebid.output,
format: 'cjs',
sourcemap: false
},
plugins: [
commonJs({ sourceMap: false }),
resolve(),
strip(),
del({ targets: prebid.babelOutput, hook: 'buildEnd' })
]
},
]
2 changes: 1 addition & 1 deletion rollup/test-resources.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default [
sourcemap: false
},
plugins: [
cleaner({targets: [OUTPUT_DIR]}),
cleaner({ targets: [OUTPUT_DIR] }),
replace({
preventAssignment: true,
LC_VERSION: JSON.stringify(`${packageJson.versionPrefix}${packageJson.version}`)
Expand Down

0 comments on commit f99a5ce

Please sign in to comment.