1 Star 1 Fork 24

阿炳/react-visual-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
craco.config.js 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
forest 提交于 2021-05-01 15:18 . 🔧 build: 添加cdn
const webpack = require('webpack')
const CracoLessPlugin = require('craco-less')
const HtmlWebpackExternalsPlugin = require('html-webpack-externals-plugin')
// const isProruction = process.env.NODE_ENV === 'production'
module.exports = {
webpack: {
module: {
rules: [],
},
plugins: [
new HtmlWebpackExternalsPlugin({
externals: [
{
module: 'react',
entry:
'https://cdn.bootcdn.net/ajax/libs/react/17.0.2/umd/react.production.min.js',
global: 'React',
},
{
module: 'react-dom',
entry:
'https://cdn.bootcdn.net/ajax/libs/react-dom/17.0.2/umd/react-dom.production.min.js',
global: 'ReactDOM',
},
],
}),
new webpack.BannerPlugin('可视化编辑器'),
],
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
// modifyVars: { '@primary-color': '#1DA57A' },
javascriptEnabled: true,
},
},
},
},
],
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/brantliu/react-visual-editor.git
[email protected]:brantliu/react-visual-editor.git
brantliu
react-visual-editor
react-visual-editor
master

搜索帮助