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/,
|
|
|
|
},
|
|
|
|
{ loader: "ifdef-loader", options: { target: "node" } },
|
|
|
|
]
|
|
|
|
},
|
|
|
|
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/,
|
|
|
|
},
|
|
|
|
{ loader: "ifdef-loader", options: { target: "native" } },
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.ts', '.ts', '.js']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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/,
|
|
|
|
},
|
|
|
|
{ loader: "ifdef-loader", options: { target: "browser" } },
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.ts', '.ts', '.js']
|
|
|
|
},
|
|
|
|
}
|
|
|
|
]
|