Created
October 9, 2018 17:41
-
-
Save marweck/0d8022c290b18b3570dbfc89cda340df to your computer and use it in GitHub Desktop.
Webpack Configuration for Node backend app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| const { ProgressPlugin } = require('webpack'); | |
| /** | |
| * Webpack config | |
| */ | |
| module.exports = { | |
| entry: './src/main.ts', | |
| mode: 'production', | |
| target: 'node', | |
| module: { | |
| rules: [ | |
| { | |
| test: /\.tsx?$/, | |
| use: 'ts-loader', | |
| exclude: /node_modules/ | |
| } | |
| ] | |
| }, | |
| plugins: [new ProgressPlugin()], | |
| resolve: { | |
| extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js'] | |
| }, | |
| output: { | |
| path: path.join(__dirname, 'dist'), | |
| filename: 'main.js' | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment