2019-01-30 23:08:45 -08:00
|
|
|
const path = require('path');
|
|
|
|
|
const webpack = require('webpack');
|
2021-03-21 14:09:03 -07:00
|
|
|
const licenseBanner = require('license');
|
2019-01-30 23:08:45 -08:00
|
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
|
{
|
|
|
|
|
entry: {
|
2021-03-28 23:57:16 -07:00
|
|
|
'planck': './src/index.ts',
|
2019-01-30 23:08:45 -08:00
|
|
|
'planck-with-testbed': './testbed/index.js',
|
|
|
|
|
},
|
|
|
|
|
output: {
|
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
|
filename: '[name].min.js',
|
|
|
|
|
library: 'planck',
|
2021-01-07 17:04:16 -08:00
|
|
|
libraryTarget: 'umd',
|
2019-01-30 23:08:45 -08:00
|
|
|
},
|
|
|
|
|
devtool: 'source-map',
|
|
|
|
|
optimization: {
|
|
|
|
|
minimize: true
|
|
|
|
|
},
|
|
|
|
|
plugins: [
|
|
|
|
|
new webpack.BannerPlugin(licenseBanner),
|
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
|
DEBUG: JSON.stringify(false),
|
|
|
|
|
ASSERT: JSON.stringify(false),
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
entry: {
|
2021-03-28 23:57:16 -07:00
|
|
|
'planck': './src/index.ts',
|
2019-01-30 23:08:45 -08:00
|
|
|
'planck-with-testbed': './testbed/index.js',
|
|
|
|
|
},
|
|
|
|
|
output: {
|
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
|
filename: '[name].js',
|
|
|
|
|
library: 'planck',
|
2021-01-07 17:04:16 -08:00
|
|
|
libraryTarget: 'umd',
|
2019-01-30 23:08:45 -08:00
|
|
|
},
|
|
|
|
|
devtool: 'source-map',
|
|
|
|
|
optimization: {
|
|
|
|
|
minimize: false,
|
|
|
|
|
},
|
|
|
|
|
plugins: [
|
|
|
|
|
// function
|
|
|
|
|
new webpack.BannerPlugin(licenseBanner),
|
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
|
DEBUG: JSON.stringify(false),
|
|
|
|
|
ASSERT: JSON.stringify(false),
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
},
|
2021-01-07 17:04:16 -08:00
|
|
|
{ // todo: remove this, added umd to others instead
|
2019-06-07 15:45:31 +02:00
|
|
|
entry: {
|
2021-03-28 23:57:16 -07:00
|
|
|
'planck': './src/index.ts',
|
2019-06-07 15:45:31 +02:00
|
|
|
'planck-with-testbed': './testbed/index.js',
|
|
|
|
|
},
|
|
|
|
|
output: {
|
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
|
filename: '[name].commonjs.js',
|
|
|
|
|
library: 'planck',
|
|
|
|
|
libraryTarget: 'commonjs'
|
|
|
|
|
},
|
|
|
|
|
devtool: 'source-map',
|
|
|
|
|
optimization: {
|
|
|
|
|
minimize: false
|
|
|
|
|
},
|
|
|
|
|
plugins: [
|
|
|
|
|
new webpack.BannerPlugin(licenseBanner),
|
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
|
DEBUG: JSON.stringify(false),
|
|
|
|
|
ASSERT: JSON.stringify(false),
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
}
|
2019-01-30 23:08:45 -08:00
|
|
|
];
|