webpack.config.js
805 Bytes
const webpackMerge = require("webpack-merge");
const singleSpaDefaults = require("webpack-config-single-spa");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = (webpackConfigEnv) => {
const orgName = "capstone-design";
const defaultConfig = singleSpaDefaults({
orgName,
projectName: "root",
webpackConfigEnv,
});
return webpackMerge.smart(defaultConfig, {
// modify the webpack config however you'd like to by adding to this object
devServer: {
historyApiFallback: true,
},
plugins: [
new HtmlWebpackPlugin({
inject: false,
template: "src/index.ejs",
templateParameters: {
isLocal: webpackConfigEnv && webpackConfigEnv.isLocal === "true",
orgName,
},
}),
],
});
};