<commit_before>const webpack = require("webpack");
const path = require("path");
const fs = require("fs");
const sharp = require("sharp");

module.exports = async ({ server: websomServer, deploy, bundles, template, createBundleRenderer}) => {
	let server = {
		webpack: {
			output: {
				publicPath: "./"
			}
		}
	};

	let client = {
		webpack: {
			mode: "production",
			plugins: [
				new webpack.DefinePlugin({
					__websom_api: JSON.stringify(websomServer.apiHost),
					__websom_data: JSON.stringify(await websomServer.configService.computeClientData(null)),
					__websom_route: JSON.stringify("/")
				})
			],
			output: {
				filename: "[name].js",
				publicPath: "/"
			}
		},
		hooks: {
			done() {

				let filename = path.resolve(websomServer.config.javascriptOutput, "index.html");
				fs.writeFileSync(filename, `
					<!DOCTYPE html>
					<html lang="${deploy.lang || 'en'}">
						<head>
							<meta name="viewport" content="width=device-width, initial-scale=1">
							<link rel="stylesheet" type="text/css" href="/main.css" />
						</head>
						<body>
							<div id="app">

							</div>
							<script src="/main.js"></script>
						</body>
					</html>
				`);
			}
		}
	};

	return {
		server,
		client
	};
};<commit_msg>Fixed static builds.<commit_after>const webpack = require("webpack");
const path = require("path");
const fs = require("fs");
const sharp = require("sharp");

module.exports = async ({ server: websomServer, deploy, bundles, template, createBundleRenderer}) => {
	let server = {
		webpack: {
			output: {
				publicPath: "./"
			}
		}
	};

	let client = {
		webpack: {
			mode: "production",
			plugins: [
				new webpack.DefinePlugin({
					__websom_api: JSON.stringify(websomServer.apiHost),
					__websom_data: JSON.stringify(await websomServer.configService.computeClientData(null)),
					__websom_static: "true"
				})
			],
			output: {
				filename: "[name].js",
				publicPath: "/"
			}
		},
		hooks: {
			done() {

				let filename = path.resolve(websomServer.config.javascriptOutput, "index.html");
				fs.writeFileSync(filename, `
					<!DOCTYPE html>
					<html lang="${deploy.lang || 'en'}">
						<head>
							<meta name="viewport" content="width=device-width, initial-scale=1">
							<link rel="stylesheet" type="text/css" href="/main.css" />
						</head>
						<body>
							<div id="app">

							</div>
							<script src="/main.js"></script>
						</body>
					</html>
				`);
			}
		}
	};

	return {
		client
	};
};
{'fraction_non_alphanumeric': 0.1743672157492969, 'fraction_numerical': 0.0008035355564483728, 'mean_word_length': 2.8724727838258164, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2819518', 'n_tokens_mistral': 1090, 'n_tokens_neox': 818, 'n_words': 155}