landxml/webpack.common.js

69 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/,
},
{ 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: {
libraryTarget: "umd",
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']
},
}
]