2 Star 0 Fork 0

浏览器 / desktop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.renderer.js 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
Eryk Rakowski 提交于 2020-05-03 18:37 . chore: build flags (#466)
/* eslint-disable */
const {
getConfig,
applyEntries,
getBaseConfig,
} = require('./webpack.config.base');
const { join } = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
/* eslint-enable */
const PORT = 4444;
const appConfig = getConfig(getBaseConfig('app'), {
target: 'electron-renderer',
devServer: {
contentBase: join(__dirname, 'build'),
port: PORT,
hot: true,
inline: true,
disableHostCheck: true,
},
});
const extPopupConfig = getConfig({
target: 'electron-renderer',
entry: {},
output: {},
devServer: {
contentBase: join(__dirname, 'build'),
port: PORT,
hot: true,
inline: true,
disableHostCheck: true,
},
});
applyEntries('app', appConfig, [
...(process.env.ENABLE_AUTOFILL ? ['form-fill', 'credentials'] : []),
'app',
'permissions',
'auth',
'find',
'menu',
'search',
'preview',
'tabgroup',
'downloads-dialog',
'add-bookmark',
'zoom',
]);
if (process.env.ENABLE_EXTENSIONS) {
extPopupConfig.entry['extension-popup'] = [
`./src/renderer/views/extension-popup`,
];
extPopupConfig.plugins.push(
new HtmlWebpackPlugin({
title: 'Wexond',
template: 'static/pages/extension-popup.html',
filename: `extension-popup.html`,
chunks: [`vendor.app`, 'extension-popup'],
}),
);
module.exports = [appConfig, extPopupConfig];
} else {
module.exports = appConfig;
}
1
https://gitee.com/browsers/desktop.git
git@gitee.com:browsers/desktop.git
browsers
desktop
desktop
master

搜索帮助