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/,
|
2021-06-30 15:14:00 +02:00
|
|
|
}
|
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/,
|
2021-06-30 15:14:00 +02:00
|
|
|
}
|
2020-12-10 16:54:02 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.ts', '.ts', '.js']
|
|
|
|
},
|
2021-06-30 15:14:00 +02:00
|
|
|
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/,
|
2021-06-30 15:14:00 +02:00
|
|
|
}
|
2020-12-10 16:54:02 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.ts', '.ts', '.js']
|
|
|
|
},
|
|
|
|
}
|
|
|
|
]
|