Skip to content

Commit

Permalink
fix: ci build error
Browse files Browse the repository at this point in the history
  • Loading branch information
da730 committed Jan 29, 2024
1 parent 0d6f848 commit c6e1810
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 0 additions & 7 deletions tools/bundler/src/logic/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ export function getRollupOptions(
input: entry,
external: getExternal(rawPackageJson, config.external),
...config.rollupOptions,
onwarn: function (warning) {
// eslint-disable-next-line no-console
console.log(warning.code, warning.message);
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR') {
return;
}
},
plugins: [
resolve(),
commonjs(),
Expand Down
9 changes: 7 additions & 2 deletions tools/bundler/src/tasks/umd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ export async function buildUmd(config: Config, projectRoot: string, rawPackageJs

const rollupOptions = getRollupOptions(projectRoot, entry, rawPackageJson, babelPlugins, { ...config, minify });
DebugConfig('RollupOptions', JSON.stringify(rollupOptions));
const bundle = await rollup(rollupOptions);

let bundle;
try {
bundle = await rollup(rollupOptions);
} catch (e) {
// eslint-disable-next-line no-console
console.error('error--------', e);
}
const dest = path.resolve(projectRoot, config.outputDir.umd!);
await generateOutputs(bundle, [
{
Expand Down

0 comments on commit c6e1810

Please sign in to comment.