2 Star 2 Fork 1

Gitee 极速下载/toolbox-browser-extension

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/JetBrains/toolbox-browser-extension
克隆/下载
webpack.config.js 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
import path from 'path';
import { fileURLToPath } from 'url';
import TerserPlugin from 'terser-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default () => ({
entry: {
'github-public': './github-public',
'gitlab-public': './gitlab-public',
'bitbucket-public': './bitbucket-public',
gitee: './providers/gitee',
background: './background',
'detect-enterprise': './detect-enterprise'
},
output: {
filename: 'jetbrains-toolbox-[name].js',
path: path.resolve(__dirname, `dist/${process.env.BROWSER}`),
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader'
},
{
test: /\.svg$/,
type: 'asset/inline'
}
]
},
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
terserOptions: {
mangle: false,
compress: {
defaults: false,
unused: true,
arguments: true,
booleans: false,
expression: false,
sequences: false,
/* eslint-disable camelcase */
join_vars: false,
keep_classnames: true,
keep_fnames: true
/* eslint-enable camelcase */
},
format: {
beautify: true,
comments: false,
/* eslint-disable camelcase */
indent_level: 2
/* eslint-enable camelcase */
}
}
})
]
},
plugins: [
new NodePolyfillPlugin({
includeAliases: ['url', 'process']
}),
new CopyWebpackPlugin({
patterns: [
{from: 'manifest.json', context: `manifests/${process.env.BROWSER}/`},
{from: 'icons/*'},
{from: 'pages/*'},
{from: 'popups/*'},
{from: 'providers/**/assets/*'},
{from: 'styles/*'}
]
})
]
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/toolbox-browser-extension.git
git@gitee.com:mirrors/toolbox-browser-extension.git
mirrors
toolbox-browser-extension
toolbox-browser-extension
master

搜索帮助