![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@epig/af-build-dev
Advanced tools
Readme
基于af-webpack的前端构建编译工具
$ npm i @epig/af-build-dev --save-dev
$ epig dev # 启动开发服务器
$ epig build # 构建项目
只列部分,详细参考af-webpack源码;
NAME | NOTES | DEFAULT_VALUE |
---|---|---|
PROT | 服务器端口 | 8000 |
ANALYZE | webpack-bundle-analyzer 插件开关 | undefined |
SPEED_MEASURE | speed-measure-webpack-plugin 插件开关 | undefined |
参考af-webpack中的webpack配置项
由于af-build-dev内建chainConfig支持,请不要配置chainConfig,其他配置项和合并到内置配置项。
内置配置项
const babelTargets = {
chrome: 49,
firefox: 64,
safari: 10,
edge: 13,
ios: 10,
...(targets || {}),
};
const webpackrc = {
publicPath: '/',
ignoreMomentLocale: true,
disableDynamicImport: false,
hash: isDev ? false : true,
...memo, // .webpackrc.js 配置项
...rest, // .epigrc.js配置项
urlLoaderExcludes: [
/\.(html|ejs|txt)$/,
...(memo.urlLoaderExcludes || []),
...(rest.urlLoaderExcludes || []),
], // 避免url-loader打包html/ejs/txt文件;
extraBabelPresets: [
[
require.resolve('babel-preset-umi'),
{
targets: babelTargets,
env: {
useBuiltIns: 'entry',
...(treeShaking ? { modules: false } : {}),
},
},
],
...(memo.extraBabelPresets || []),
...(rest.extraBabelPresets || []),
],
extraBabelPlugins: [
[require.resolve('babel-plugin-import'), { libraryName: 'antd', style: true }],
[require.resolve('babel-plugin-import'), { libraryName: 'antd-mobile', style: true }, 'antd-mobile'],
...(memo.extraBabelPlugins || []),
...(rest.extraBabelPlugins || []),
],
}
在此配置文件中也可以配置 .webpackrc.js 的同名配置项,会合并使用(优先级:.epigrc.js>.webpackrc.js), 但是配置在此的配置项不会进行检查。
数组项支持为插件名字或者自定义方法。
如果插件有参数,则通过数组的形式进行配置,第一项是插件名字,第二项是参数,类似 babel 插件的配置方式。
无参数
plugins: [
['epig-plugin-admin'],
],
有参数
plugins: [
['epig-plugin-admin', {noAutoRoute: true}],
],
可支持链式配置webpack配置,参考webpack-chain
chainWebpack(config, { webpack }) {
// 设置 alias
config.resolve.alias.set('a', 'path/to/a');
}
babel语法兼容配置
// 支持ie11
targets: {
ie: 11,
}
FAQs
基于af-webpack的前端构建编译工具
The npm package @epig/af-build-dev receives a total of 0 weekly downloads. As such, @epig/af-build-dev popularity was classified as not popular.
We found that @epig/af-build-dev demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.