@i4mi/js-on-fhir
Version:
A JavaScript wrapper for the I4MI FHIR library.
52 lines (48 loc) • 1.32 kB
JavaScript
var path = require("path");
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var PATHS = {
entryPoint: path.resolve(__dirname, 'src/index.ts'),
bundles: path.resolve(__dirname, '_bundles'),
}
var config = {
entry: {
'js-on-fhir': [PATHS.entryPoint],
},
// When including the bundle in the browser it will be accessible at `window.web-fhir`
output: {
path: PATHS.bundles,
filename: '[name].js',
libraryTarget: 'umd',
library: 'js-on-fhir',
umdNamedDefine: true
},
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
devtool: 'source-map',
// optimization: {
// minimizer: [
// // we specify a custom UglifyJsPlugin here to get source maps in production
// new UglifyJsPlugin({
// cache: true,
// parallel: true,
// uglifyOptions: {
// compress: false,
// ecma: 6,
// mangle: true
// },
// sourceMap: true
// })
// ]
// },
module: {
rules: [{
test: /\.tsx?$/,
exclude: /node_modules/,
query: {
declaration: false,
}
}]
}
}
module.exports = config;