
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
基于webpack5 module federation conf 统一B端cli
npx @coral/cli init
npm i -g @coral/cli
or yarn global add @coral/cli
coral init
初始化项目coral dev
调试
coral dev --hot
热更coral dev --open
打开调试页面coral build
构建
coral build --env
指定 部署环境coral build --analyze
分析coral
helpprocess.env.MODE_ENV
[推荐] 或者 process.env.NODE_ENV
调用coral dev --env prod
进行设置 用来区分不同环境 , 通过 process.env.CORAL_ENV
调用 const {resolveApp} = require('@coral/cli/helpers/paths')
const {proxy} = resolveApp('./package.json');
module.exports = ({ config, env, coralEnv }) => {
const port = 8000;
const url = {
prod: '线上环境地址',
test: '测试环境地址',
dev: `http://localhost:${port}/`,
};
const publicPath = url[coralEnv] || `http://localhost:${port}/`;
config.output.publicPath(publicPath);
config.devServer.port(port);
config.devServer.proxy(proxy || {});
// 让其他svg loader不对src/assets/icon进行操作
config.module
.rule('svg')
.exclude.add(resolveApp('src/assets/svg'))
.end();
config.module
.rule('icon')
.test(/\.svg$/)
.include.add(resolveApp('src/assets/svg'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]',
})
.end();
// 配置 index.html
config.plugin('html').tap((args) => {
args[0] = {
...args[0],
...{
title: 'Lexios',
files: {
js: [], // 注入到index.html,js,如rem.js
css: [],
},
},
};
return args;
});
};
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib", //支持 ts css module type check
"typescript.enablePromptUseWorkspaceTsdk": true //支持 ts css module type check
}
FAQs
统一B端脚手架及项目初始化模版
We found that coral-cli6 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.