diff --git a/package.json b/package.json index 154388e..2b0dc19 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/src/main.hmr.ts b/src/main.hmr.ts deleted file mode 100644 index 81e8c13..0000000 --- a/src/main.hmr.ts +++ /dev/null @@ -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(); diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index d2aff9f..0000000 --- a/webpack.config.js +++ /dev/null @@ -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', - }, -};