js-3dstk
Version:
Universal JavaScript Client for the 3D Streaming Toolkit - Supports Node.js, Browser and React-Native.
34 lines (30 loc) • 737 B
JavaScript
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
filename: 'js-3dstk.js',
path: path.resolve(__dirname, 'dist'),
library: 'ThreeDSTK'
},
plugins: [
new CleanWebpackPlugin(['dist']),
new LodashModuleReplacementPlugin()
],
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
plugins: ['lodash'],
presets: ['env']
}
}
}
]
}
};