mirror of
https://github.com/jellyfin/jellyfin-sdk-typescript.git
synced 2024-11-27 00:01:19 +00:00
Use preserveModules in rollup build
This commit is contained in:
parent
32294f5db8
commit
2ffeef41ec
@ -4,10 +4,12 @@ import { fileURLToPath } from 'node:url';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import { glob } from 'glob';
|
||||
|
||||
/** @type {import('rollup').RollupOptions} */
|
||||
export default {
|
||||
// This is adapted from the sample config: https://www.rollupjs.org/configuration-options/#input
|
||||
input: Object.fromEntries(
|
||||
glob.sync('src/**/*.ts', { ignore: 'src/**/__{helpers,tests}__/*' }).map(file => [
|
||||
// Only looking for index files since they should be the only entry points
|
||||
glob.sync('src/**/index.ts', { ignore: 'src/**/__{helpers,tests}__/*' }).map(file => [
|
||||
// This remove `src/` as well as the file extension from each
|
||||
// file, so e.g. src/nested/foo.js becomes nested/foo
|
||||
path.relative(
|
||||
@ -21,7 +23,9 @@ export default {
|
||||
),
|
||||
output: {
|
||||
dir: 'lib',
|
||||
format: 'es'
|
||||
format: 'es',
|
||||
preserveModules: true,
|
||||
preserveModulesRoot: 'src'
|
||||
},
|
||||
external: [
|
||||
'axios',
|
||||
|
Loading…
Reference in New Issue
Block a user