Skip to content

Instantly share code, notes, and snippets.

@FreekMencke
Last active May 18, 2019 11:50
Show Gist options
  • Select an option

  • Save FreekMencke/83bd9fae9ea1874ebf39297237a3d9f2 to your computer and use it in GitHub Desktop.

Select an option

Save FreekMencke/83bd9fae9ea1874ebf39297237a3d9f2 to your computer and use it in GitHub Desktop.
How to Write Node.js Applications in TypeScript - webpack.config.js - step 1
'use strict';
module.exports = (env = {}) => {
const config = {
entry: ['./src/main.js'],
mode: env.development ? 'development' : 'production',
target: 'node',
// devtool alternatives: 'cheap-module-eval-source-map' (faster, less details) or 'cheap-eval-source-map' (fastest, even less details)
devtool: env.development ? 'inline-source-map' : false,
};
return config;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment