Skip to content
Snippets Groups Projects
Commit b9242c2d authored by Robert Long's avatar Robert Long
Browse files

Fix smoke tests.

parent 18460143
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ class LodashTemplatePlugin { ...@@ -73,7 +73,7 @@ class LodashTemplatePlugin {
} }
} }
module.exports = { const config = {
entry: { entry: {
lobby: path.join(__dirname, "src", "lobby.js"), lobby: path.join(__dirname, "src", "lobby.js"),
room: path.join(__dirname, "src", "room.js"), room: path.join(__dirname, "src", "room.js"),
...@@ -201,3 +201,30 @@ module.exports = { ...@@ -201,3 +201,30 @@ module.exports = {
}) })
] ]
}; };
module.exports = () => {
if (process.env.GENERATE_SMOKE_TESTS && process.env.BASE_ASSETS_PATH) {
const smokeConfig = Object.assign({}, config, {
// Set the public path for to point to the correct assets on the smoke-test build.
output: Object.assign({}, config.output, {
publicPath: process.env.BASE_ASSETS_PATH.replace("://", "://smoke-")
}),
// For this config
plugins: config.plugins.map(plugin => {
if (plugin instanceof HTMLWebpackPlugin) {
return new HTMLWebpackPlugin(
Object.assign({}, plugin.options, {
filename: "smoke-" + plugin.options.filename
})
);
}
return plugin;
})
});
return [config, smokeConfig];
} else {
return config;
}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment