UNPKG

whs-cube-spheres

Version:

This plugin has a container with multiple spheres.

50 lines (45 loc) 962 B
import path from 'path'; import webpack from 'webpack'; process.env.BABEL_ENV = 'browser'; const isProduction = process.env.NODE_ENV === 'production'; console.log( isProduction ? 'Production mode' : 'Development mode' ); export default { devtool: isProduction ? false : 'source-map', entry: './src/index.js', target: 'web', output: { path: path.join(__dirname, './build/'), filename: 'DatGUIModule.js', libraryTarget: 'umd', library: 'DatGUIModule' }, externals: { whs: 'WHS', three: 'THREE' }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' } ] }, plugins: isProduction ? [ new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false }, minimize: true }), ] : [], devServer: { contentBase: './examples/', publicPath: '/build/' } }