1 Star 0 Fork 0

jamesmsw / franz

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.base.js 563 Bytes
一键复制 编辑 原始数据 按行查看 历史
Stefan Malzner 提交于 2019-01-10 10:47 . fix webpack issue
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
const IS_DEV = process.env.NODE_ENV === 'development';
module.exports = dir => ({
context: dir,
entry: path.join(dir, '/src/index.ts'),
module: {
rules: [{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
}],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
devtool: 'inline-source-map',
mode: IS_DEV ? 'development' : 'production',
optimization: {
minimizer: !IS_DEV ? [new TerserPlugin()] : [],
},
});
JavaScript
1
https://gitee.com/sanshengshui/franz.git
git@gitee.com:sanshengshui/franz.git
sanshengshui
franz
franz
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891