1 Star 7 Fork 4

Vincent/form-render

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.prod.js 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
fateriddle 提交于 2020-01-06 14:34 . use production ready source-map
const webpack = require('webpack');
const { resolve } = require('path');
module.exports = {
mode: 'production',
context: resolve(__dirname, 'src'),
entry: {
index: './index.js',
antd: './antd.js',
fusion: './fusion.js',
},
devtool: 'source-map', // smaller bundle size: https://webpack.js.org/configuration/devtool/
output: {
filename: '[name].js',
path: resolve(__dirname, 'dist'),
},
plugins: [
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /zh-cn/),
],
externals: {
react: 'var window.React',
'react-dom': 'var window.ReactDOM',
'prop-types': 'var (window.PropTypes || window.React.PropTypes)',
'@alifd/next': 'var window.Next',
},
resolve: {
extensions: ['.js', '.jsx'],
},
module: {
rules: [
{
test: /\.jsx?$/,
use: ['babel-loader'],
exclude: /node_modules/,
},
{
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.less$/,
use: [
'style-loader',
'css-loader',
{
loader: 'less-loader',
options: {
javascriptEnabled: true,
},
},
],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vincentjava/form-render.git
[email protected]:vincentjava/form-render.git
vincentjava
form-render
form-render
master

搜索帮助