pyright/server/webpack.config.js
2019-03-11 20:45:56 -07:00

44 lines
897 B
JavaScript

/**
* webpack.config.js
* Copyright: Microsoft 2018
*
* Configuration for webpack to bundle the javascript into a single file.
*/
const path = require('path');
module.exports = {
entry: './src/server.ts',
mode: 'development',
target: 'node',
output: {
filename: 'server.js',
path: path.resolve(__dirname, '../client/server')
},
resolve: {
modules: [
path.resolve(__dirname, '.'),
'node_modules'
],
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js']
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
configFile: 'tsconfig.json'
}
}
]
},
node: {
fs: 'empty'
}
};