Skip to content

Commit

Permalink
Fix lint issues in rollup.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Oct 12, 2024
1 parent c56620c commit fc5f444
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"test:bundler:webpack": "cd test/webpack && npm install && npm test",
"test:types": "tsc -p ./test/types/tsconfig.json",
"test:unit": "node --experimental-import-meta-resolve node_modules/jasmine/bin/jasmine.js --config=test/unit/jasmine.json",
"lint": "eslint eslint.config.mjs \"src/**/*.ts\"",
"lint": "eslint \"*.mjs\" \"src/**/*.ts\"",
"build": "npm run build:bundle && npm run build:types",
"build:bundle": "rollup -c",
"build:types": "tsc --project . --emitDeclarationOnly --declarationDir ./lib && api-extractor run",
Expand Down
42 changes: 24 additions & 18 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,31 +83,37 @@ function plugins({ target }) {
declaration: false,
declarationMap: false
}),
target === 'es5' ? inject({
include: 'src/**/*.ts',
exclude: 'src/stub/symbol.ts',
modules: {
Symbol: path.resolve(dirname, './src/stub/symbol.ts')
}
}) : undefined,
target === 'es5'
? inject({
include: 'src/**/*.ts',
exclude: 'src/stub/symbol.ts',
modules: {
Symbol: path.resolve(dirname, './src/stub/symbol.ts')
}
})
: undefined,
replace({
include: 'src/**/*.ts',
preventAssignment: true,
values: {
DEBUG: debug
}
}),
!debug ? strip({
include: 'src/**/*.ts',
functions: ['assert']
}) : undefined,
!debug ? terser({
keep_classnames: keepRegex, // needed for WPT
keep_fnames: keepRegex,
mangle: {
toplevel: true
}
}) : undefined
!debug
? strip({
include: 'src/**/*.ts',
functions: ['assert']
})
: undefined,
!debug
? terser({
keep_classnames: keepRegex, // needed for WPT
keep_fnames: keepRegex,
mangle: {
toplevel: true
}
})
: undefined
].filter(Boolean);
}

Expand Down

0 comments on commit fc5f444

Please sign in to comment.