const webpack = require('webpack'); var HtmlWebPackPlugin = require("html-webpack-plugin"); const dllName = "dll" var path = require('path'); const vendors = [ "three", "lodash", "dat.gui", "react", "react-dom", "stats.js" ]; module.exports = { output: { path: path.resolve(__dirname, 'dist'), filename: dllName + '.js', library: dllName, }, entry: { "lib": vendors, }, resolve: { alias: { "dat.gui": path.resolve(__dirname, './node_modules/dat.gui/build/dat.gui.js'), } }, devtool: "source-map", plugins: [ new webpack.DllPlugin({ path: 'manifest.json', name: dllName, context: __dirname, }) ], };