mirror of
https://github.com/bendtherules/tbl.git
synced 2026-08-18 13:51:55 +00:00
Initial setup
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const supportObjectRestSpread = require('@babel/plugin-proposal-object-rest-spread');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
tbl: './index.js',
|
||||
'tbl.min': './index.js',
|
||||
},
|
||||
devtool: 'source-map',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].js',
|
||||
libraryTarget: 'umd',
|
||||
library: 'tbl',
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
include: /\.min\.js$/,
|
||||
minimize: true,
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-env'],
|
||||
plugins: [supportObjectRestSpread],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user