You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.0 KiB
JavaScript

/* global
require:true,
__dirname:true,
*/
const path = require('path');
module.exports = {
target: 'web',
mode: 'production',
devtool: 'source-map',
entry: './src/canvas.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'cvat-canvas.js',
library: 'canvas',
libraryTarget: 'commonjs',
},
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
inline: true,
port: 9000,
},
module: {
rules: [{
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
],
[
'@babel/typescript',
],
],
sourceType: 'unambiguous',
},
},
}],
},
};