Skip to content

Commit

Permalink
build: refactored rollup config
Browse files Browse the repository at this point in the history
  • Loading branch information
asadali214 committed Jul 21, 2024
1 parent cc41d16 commit 64f6918
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/test-utilities/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import typescript from 'rollup-plugin-typescript2';
const packageJson = require('./package.json');

const createTsPlugin = ({ declaration = true, target } = {}) =>
const getTsPlugin = ({ declaration = true, target } = {}) =>
typescript({
clean: true,
tsconfigOverride: {
Expand All @@ -12,16 +11,16 @@ const createTsPlugin = ({ declaration = true, target } = {}) =>
}
});

const createNpmConfig = ({ input, output, external }) => ({
const getNpmConfig = ({ input, output, external }) => ({
input,
output,
preserveModules: true,
plugins: [createTsPlugin({ declaration: true })],
plugins: [getTsPlugin({ declaration: true })],
external
});

export default [
createNpmConfig({
getNpmConfig({
input: 'src/index.ts',
output: [
{
Expand Down

0 comments on commit 64f6918

Please sign in to comment.