Skip to content

Commit

Permalink
fix: exclude .json exports from build
Browse files Browse the repository at this point in the history
Context: 6767c0f and
6781286
  • Loading branch information
danielroe committed Mar 8, 2021
1 parent 2881914 commit 5fb0c9f
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/core/build/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,20 @@ export function getRollupConfig(
plugins: getDeclarationPlugins(),
})
),
...exports.map(outfile =>
defu({}, options as RollupOptions, {
input: pkg.resolveEntrypoint(outfile),
output: {
...getFilenames(outfile),
preferConst: true,
exports: 'auto',
} as OutputOptions,
external,
plugins: getPlugins(),
})
),
...exports
.filter(outfile => outfile && !outfile.match(/\.json$/))
.map(outfile =>
defu({}, options as RollupOptions, {
input: pkg.resolveEntrypoint(outfile),
output: {
...getFilenames(outfile),
preferConst: true,
exports: 'auto',
} as OutputOptions,
external,
plugins: getPlugins(),
})
),
...exports
.filter(outfile => outfile && !outfile.match(/\.json$/))
.map(outfile =>
Expand Down

0 comments on commit 5fb0c9f

Please sign in to comment.