Skip to content

Commit

Permalink
Chore(web): Use outDir to corectly setup output directory
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Oct 14, 2024
1 parent 0ce9377 commit 5ceb16f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/web/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ const plugins = [
// Include the helpers in the bundle, at most one copy of each
babelHelpers: 'bundled',
}),
typescript({
target: 'es6',
compilerOptions: { rootDir: './src' },
exclude: ['**/__tests__', '**/*.test.ts'],
declaration: false,
}),
];

if (BUNDLE) {
Expand All @@ -40,6 +34,18 @@ if (BUNDLE) {
);
}

plugins.push(
typescript({
target: 'es6',
compilerOptions: {
rootDir: './src',
outDir: path.resolve(__dirname, `../dist/js/${fileDirectory}`),
},
exclude: ['**/__tests__', '**/*.test.ts'],
declaration: false,
}),
);

const filePath = `../dist/js/${fileDirectory}/${fileDestination}`;
const format = ESM ? 'esm' : 'umd';

Expand Down

0 comments on commit 5ceb16f

Please sign in to comment.