Skip to content

Commit

Permalink
fix: fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Harrison Ifeanyichukwu authored and Harrison Ifeanyichukwu committed May 13, 2020
1 parent 8fa84f1 commit 77e86e1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const { config } = require('./lib');
const { config } = require('./temp');
module.exports = config({});
30 changes: 15 additions & 15 deletions src/modules/Bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ class Bundler {
: allExternal;

const onWarn = (warning, warn) => {
console.log(warning.message);
warn(warning);
};

Expand All @@ -301,21 +302,20 @@ class Bundler {
external,
onwarn: onWarn,
})
.then((bundler) => {
return bundler
.write({
file: out,
format: config.format,
interop: config.interop,
sourcemap: config.sourcemap,
name,
})
.then(() => {
if (this.bundlerOptions.generateOutputLogs) {
log(chalk.green(`${oldRelativePath} ... ${out} \n`));
}
return null;
});
.then((bundler) =>
bundler.write({
file: out,
format: config.format,
interop: config.interop,
sourcemap: config.sourcemap,
name,
}),
)
.then(() => {
if (this.bundlerOptions.generateOutputLogs) {
log(chalk.green(`${oldRelativePath} ... ${out} \n`));
}
return null;
})
.catch(onError),
);
Expand Down
4 changes: 2 additions & 2 deletions src/modules/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ export const getRollupPlugins = (
babelrc: false,

presets: getBabelPresets(
generalConfig?.babelConfig?.presets,
generalConfig?.babelConfig?.presets || [],
internalNodeModulesDir,
),

plugins: getBabelPlugins(
generalConfig?.babelConfig?.plugins,
generalConfig?.babelConfig?.plugins || [],
internalNodeModulesDir,
buildConfig.format === 'esm',
),
Expand Down

0 comments on commit 77e86e1

Please sign in to comment.