Skip to content

Instantly share code, notes, and snippets.

@Arlen22
Created June 1, 2019 03:43
Show Gist options
  • Save Arlen22/414cd6b313abfa80f63ec8922341ee8e to your computer and use it in GitHub Desktop.
Save Arlen22/414cd6b313abfa80f63ec8922341ee8e to your computer and use it in GitHub Desktop.
TypeScript project files
const path = require('path');
module.exports = {
entry: './src/index.ts',
target: "node",
mode: "development",
devtool: 'inline-source-map',
watch: true,
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: [ '.tsx', '.ts', '.js' ]
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname),
libraryTarget: 'commonjs'
},
externals: [/* "googleapis" */]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment