1 Star 0 Fork 26

xiaoshi_love / Nest-Web

forked from 蕉zisuzz / Nest-Web 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 826 Bytes
一键复制 编辑 原始数据 按行查看 历史
蕉zisuzz 提交于 2019-10-08 10:33 . first 提交
const webpack = require('webpack');
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: ['webpack/hot/poll?1000', './src/main.hmr.ts'],
watch: true,
target: 'node',
externals: [
nodeExternals({
whitelist: ['webpack/hot/poll?1000'],
}),
],
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
mode: "development",
resolve: {
extensions: ['.tsx', '.ts', '.js'],
alias: {
'@code':path.join(__dirname,'src/support/code'),
'@code/*':path.join(__dirname,'src/support/code'),
}
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'server.js',
},
};
TypeScript
1
https://gitee.com/xiaoshi_love/Nest-Web.git
git@gitee.com:xiaoshi_love/Nest-Web.git
xiaoshi_love
Nest-Web
Nest-Web
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891