webperftoolbar/webpack.common.js

39 строки
1.0 KiB
JavaScript
Исходник Обычный вид История

2017-12-14 03:03:26 +03:00
const path = require('path');
2017-12-21 07:28:56 +03:00
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
2017-12-14 03:03:26 +03:00
module.exports = {
2017-12-19 03:56:11 +03:00
entry: './src/index.ts',
2017-12-14 03:03:26 +03:00
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
2017-12-21 07:28:56 +03:00
loader: 'ts-loader',
options: {
// disable type checker - we will use it in fork plugin
transpileOnly: true
}
}
2017-12-16 05:24:07 +03:00
],
loaders: [
2017-12-21 07:28:56 +03:00
{ test: /sinon\.js$/, loader: "imports?define=>false,require=>false" }
2017-12-15 03:04:00 +03:00
],
exprContextCritical: false
2017-12-14 03:03:26 +03:00
},
2017-12-21 07:28:56 +03:00
plugins: [
new ForkTsCheckerWebpackPlugin({ tslint: true })
],
2017-12-14 03:03:26 +03:00
resolve: {
2017-12-16 05:24:07 +03:00
extensions: ['.ts', '.js'],
alias: {
sinon: 'sinon/pkg/sinon.js'
2017-12-19 03:56:11 +03:00
},
modules: ['src', 'node_modules']
2017-12-14 03:03:26 +03:00
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
2017-12-19 03:56:11 +03:00
library: 'PerfToolbar',
libraryTarget: 'var'
2017-12-14 03:03:26 +03:00
}
};