7 Star 53 Fork 13

朱平齐 / RuiJi.Scraper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.txt 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
朱平齐 提交于 2020-08-24 11:57 . 添加项目文件。
const path = require('path');
const webpack = require('webpack');
module.exports = {
target: 'web',
mode: "production",
entry: {
vcore: './src/core.ts',
main: './src/main.ts'
},
output: {
path: __dirname + '/dist',
filename: '[name].js'
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
modules: [
path.join(__dirname, "src"),
"node_modules"
]
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
options: {
transpileOnly: true
}
}
]
},
performance: {
hints: false
},
optimization: {
splitChunks: {
chunks: 'async',
minSize: 30000,
maxSize: 0,
minChunks: 1,
maxAsyncRequests: 5,
maxInitialRequests: 3,
automaticNameDelimiter: '~',
name: true,
cacheGroups: {
commons: {
name: "commons",
chunks: "initial",
minChunks: 2
}
}
}
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
})
]
}
TypeScript
1
https://gitee.com/zhupingqi/RuiJi.Scraper.git
git@gitee.com:zhupingqi/RuiJi.Scraper.git
zhupingqi
RuiJi.Scraper
RuiJi.Scraper
master

搜索帮助