1 Star 0 Fork 12

huawei/kpc

forked from Javey/kpc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.server.js 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
const webpack = require('webpack');
const path = require('path');
const nodeExternal = require('webpack-node-externals');
const webpackConfig = require('./webpack.config.common');
const merge = require('webpack-merge');
module.exports = merge.smartStrategy({
'module.rules.use': 'prepend'
})(webpackConfig, {
entry: {
server: [
'webpack/hot/poll?1000',
'./app/server.js',
],
},
output: {
chunkFilename: 'chunk/[chunkhash].js',
},
target: 'node',
externals: [
nodeExternal({whitelist: ['universal-router', 'webpack/hot/poll?1000']}),
{'../webpack.config.client': 'commonjs ../webpack.config.client'}
],
node: {
__dirname: false,
__filename: false,
},
module: {
rules: [
{
test: /\.(styl|css)$/,
use: [
{loader: 'node-style-loader'},
]
},
]
},
plugins: [
new webpack.BannerPlugin({
banner: 'require("source-map-support").install();',
raw: true,
entryOnly: false,
}),
new webpack.DefinePlugin({
'process.node': true,
}),
]
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/weizai118/kpc.git
git@gitee.com:weizai118/kpc.git
weizai118
kpc
kpc
master

搜索帮助