Skip to content

Commit

Permalink
fix: pass props to webpackConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 13, 2021
1 parent 1870bea commit 22b5034
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions integrations/base-integration/src/webpack-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const webpackConfig = ({
options,
}: {
config?: any;
options: BuildProps;
options?: BuildProps;
}): any => {
const buildOptions = createOptions(options);
const bundleFilePath = getBundleName(buildOptions);
Expand All @@ -109,13 +109,11 @@ export const webpackConfig = ({
};
};

export const asyncWebpackConfig = async ({
config,
options,
}: {
export const asyncWebpackConfig = async (props: {
config: any;
options?: BuildProps;
}): Promise<any> => {
const { config, options } = props;
const mode = config.mode;
if (typeof process.env.NODE_ENV === 'undefined') {
process.env.NODE_ENV = mode;
Expand All @@ -124,5 +122,5 @@ export const asyncWebpackConfig = async ({
await buildBundle({
options,
});
return webpackConfig(config);
return webpackConfig(props);
};

0 comments on commit 22b5034

Please sign in to comment.