2023-01-14 00:41:33 +00:00
|
|
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
2023-01-14 12:19:02 +00:00
|
|
|
let commitHash = require('child_process')
|
|
|
|
.execSync('git rev-parse --short HEAD')
|
|
|
|
.toString()
|
|
|
|
.trim();
|
2023-01-14 00:41:33 +00:00
|
|
|
const path = require('path');
|
2023-01-14 12:19:02 +00:00
|
|
|
const webpack = require('webpack');
|
2023-01-14 00:41:33 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: "./bootstrap.js",
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, "dist"),
|
|
|
|
filename: "bootstrap.js",
|
|
|
|
},
|
|
|
|
mode: "development",
|
|
|
|
plugins: [
|
2023-01-14 12:19:02 +00:00
|
|
|
new CopyWebpackPlugin(['index.html', 'govuk.css']),
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
__COMMIT_HASH__: JSON.stringify(commitHash)
|
|
|
|
})
|
2023-01-14 00:41:33 +00:00
|
|
|
],
|
|
|
|
};
|