ux: remove webpack (hmr) from starter repo
This commit is contained in:
parent
2d2f16aa6d
commit
583f0ecb11
|
|
@ -11,13 +11,11 @@
|
|||
"start:debug": "nodemon --config nodemon-debug.json",
|
||||
"prestart:prod": "rimraf dist && tsc",
|
||||
"start:prod": "node dist/main.js",
|
||||
"start:hmr": "node dist/server",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:cov": "jest --coverage",
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json",
|
||||
"webpack": "webpack --config webpack.config.js"
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "^5.1.0",
|
||||
|
|
@ -43,10 +41,7 @@
|
|||
"ts-loader": "^4.4.2",
|
||||
"ts-node": "^7.0.1",
|
||||
"tsconfig-paths": "^3.5.0",
|
||||
"tslint": "5.11.0",
|
||||
"webpack": "^4.16.5",
|
||||
"webpack-cli": "^3.1.0",
|
||||
"webpack-node-externals": "^1.7.2"
|
||||
"tslint": "5.11.0"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
declare const module: any;
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
await app.listen(3000);
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept();
|
||||
module.hot.dispose(() => app.close());
|
||||
}
|
||||
}
|
||||
bootstrap();
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
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'],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
],
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist'),
|
||||
filename: 'server.js',
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue