landxml/webpack.common.js

71 lines
1.3 KiB
JavaScript

const webpack = require('webpack')
module.exports = [
{
entry: {
main: ['babel-polyfill', './index.js'],
},
output: {
libraryTarget: "commonjs2",
},
module: {
rules: [
{
test: /\.(t|j)s$/,
use: 'ts-loader',
exclude: /node_modules/,
}
]
},
resolve: {
extensions: ['*', '.ts', '.ts', '.js']
},
},
{
entry: {
main: ['babel-polyfill', './index.js'],
},
output: {
libraryTarget: "commonjs2",
},
module: {
rules: [
{
test: /\.(t|j)s$/,
use: 'ts-loader',
exclude: /node_modules/,
}
]
},
resolve: {
extensions: ['*', '.ts', '.ts', '.js']
},
plugins: [
new webpack.NormalModuleReplacementPlugin(
/^xml2js$/, 'react-native-xml2js',
),
]
},
{
entry: {
main: ['babel-polyfill', './index.js'],
},
output: {
libraryTarget: "umd",
library: "landxml",
},
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.(t|j)s$/,
use: 'ts-loader',
exclude: /node_modules/,
}
]
},
resolve: {
extensions: ['*', '.ts', '.ts', '.js']
},
}
]