Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getAppWebpackConfig({ path, filename, mode }) {
// XXX: This is an experiment to see what would a Cosmos API for building
// an app bundle would look like
const { rootPath, globalImports } = getCosmosConfig(COSMOS_CONFIG_PATH);
const defaultWebpackConfig = getDefaultWebpackConfig(rootPath);
let webpackConfig = {
...defaultWebpackConfig,
mode,
devtool: mode === 'production' ? false : defaultWebpackConfig.devtool,
entry: [...globalImports, require.resolve('../../../App.dom')],
output: {
path,
filename,
publicPath: '/'
}
};
// XXX: Omit HtmlWebpackPlugin used in renderer build
webpackConfig = {
...webpackConfig,