landxml/webpack.common.js

71 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2020-12-10 16:54:02 +01:00
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/,
}
2020-12-10 16:54:02 +01:00
]
},
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/,
}
2020-12-10 16:54:02 +01:00
]
},
resolve: {
extensions: ['*', '.ts', '.ts', '.js']
},
plugins: [
new webpack.NormalModuleReplacementPlugin(
/^xml2js$/, 'react-native-xml2js',
),
]
2020-12-10 16:54:02 +01:00
},
{
entry: {
main: ['babel-polyfill', './index.js'],
},
output: {
2021-02-18 16:55:10 +01:00
libraryTarget: "umd",
2020-12-10 16:54:02 +01:00
library: "landxml",
},
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.(t|j)s$/,
use: 'ts-loader',
exclude: /node_modules/,
}
2020-12-10 16:54:02 +01:00
]
},
resolve: {
extensions: ['*', '.ts', '.ts', '.js']
},
}
]