DenReg/jsx-html/examples/browser/webpack.config.js

34 lines
622 B
JavaScript
Raw Normal View History

2020-10-14 00:56:11 +00:00
const path = require('path');
const MODULE_NAME = 'demo';
module.exports = {
mode: 'development',
entry: {
index: './src/index.tsx'
},
devtool: 'inline-source-map',
devServer: {
contentBase: './dist'
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [ '.tsx', '.ts', '.js' ],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
globalObject: 'this',
// libraryExport: 'default',
library: MODULE_NAME
},
};