uhr/webpack.config.js

40 lines
830 B
JavaScript
Raw Normal View History

2019-05-05 02:44:01 +02:00
/*
* Copyright (C) Schweizerische Bundesbahnen SBB, 2019.
*/
const path = require('path');
module.exports = {
entry: [
'./src/index.ts'
2019-05-05 02:44:01 +02:00
],
// devtool: 'inline-source-map',
mode: 'production',
2019-05-05 02:44:01 +02:00
module: {
rules: [
{
2019-05-05 12:18:46 +02:00
enforce: 'pre',
2019-05-05 02:44:01 +02:00
test: /\.tsx?$/,
2019-05-05 12:18:46 +02:00
exclude: /node_modules/,
use: 'eslint-loader'
}, {
test: /\.tsx?$/,
exclude: /node_modules/,
use: 'ts-loader'
2019-05-05 02:44:01 +02:00
}
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
output: {
filename: 'uhr.js',
library: 'uhr',
2019-05-05 02:44:01 +02:00
path: path.resolve(__dirname, 'dist')
},
externals: {
jquery: 'jQuery',
'js-cookie': 'Cookies'
2019-05-05 02:44:01 +02:00
}
};