mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-20 06:33:49 +01:00
Merge pull request #3413 from danielyxie/fix-dev-building
Fix dev building
This commit is contained in:
commit
12c54023db
4
dist/main.bundle.js
vendored
4
dist/main.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main.bundle.js.map
vendored
2
dist/main.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
@ -46,6 +46,48 @@ module.exports = (env, argv) => {
|
||||
// https://stackoverflow.com/a/38401256
|
||||
const commitHash = require("child_process").execSync("git rev-parse --short HEAD").toString().trim();
|
||||
|
||||
const htmlConfig = {
|
||||
title: "Bitburner",
|
||||
template: "src/index.html",
|
||||
favicon: "favicon.ico",
|
||||
googleAnalytics: {
|
||||
trackingId: "UA-100157497-1",
|
||||
},
|
||||
meta: {},
|
||||
minify: isDevelopment
|
||||
? false
|
||||
: {
|
||||
collapseBooleanAttributes: true,
|
||||
collapseInlineTagWhitespace: false,
|
||||
collapseWhitespace: false,
|
||||
conservativeCollapse: false,
|
||||
html5: true,
|
||||
includeAutoGeneratedTags: false,
|
||||
keepClosingSlash: true,
|
||||
minifyCSS: false,
|
||||
minifyJS: false,
|
||||
minifyURLs: false,
|
||||
preserveLineBreaks: false,
|
||||
preventAttributesEscaping: false,
|
||||
processConditionalComments: false,
|
||||
quoteCharacter: '"',
|
||||
removeAttributeQuotes: false,
|
||||
removeComments: false,
|
||||
removeEmptyAttributes: false,
|
||||
removeEmptyElements: false,
|
||||
removeOptionalTags: false,
|
||||
removeScriptTypeAttributes: false,
|
||||
removeStyleLinkTypeAttributes: false,
|
||||
removeTagWhitespace: false,
|
||||
sortAttributes: false,
|
||||
sortClassName: false,
|
||||
useShortDoctype: false,
|
||||
},
|
||||
};
|
||||
if (!isDevelopment) {
|
||||
htmlConfig.filename = "../index.html";
|
||||
}
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
@ -60,45 +102,7 @@ module.exports = (env, argv) => {
|
||||
jQuery: "jquery",
|
||||
$: "jquery",
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
title: "Bitburner",
|
||||
template: "src/index.html",
|
||||
filename: "../index.html",
|
||||
favicon: "favicon.ico",
|
||||
googleAnalytics: {
|
||||
trackingId: "UA-100157497-1",
|
||||
},
|
||||
meta: {},
|
||||
minify: isDevelopment
|
||||
? false
|
||||
: {
|
||||
collapseBooleanAttributes: true,
|
||||
collapseInlineTagWhitespace: false,
|
||||
collapseWhitespace: false,
|
||||
conservativeCollapse: false,
|
||||
html5: true,
|
||||
includeAutoGeneratedTags: false,
|
||||
keepClosingSlash: true,
|
||||
minifyCSS: false,
|
||||
minifyJS: false,
|
||||
minifyURLs: false,
|
||||
preserveLineBreaks: false,
|
||||
preventAttributesEscaping: false,
|
||||
processConditionalComments: false,
|
||||
quoteCharacter: '"',
|
||||
removeAttributeQuotes: false,
|
||||
removeComments: false,
|
||||
removeEmptyAttributes: false,
|
||||
removeEmptyElements: false,
|
||||
removeOptionalTags: false,
|
||||
removeScriptTypeAttributes: false,
|
||||
removeStyleLinkTypeAttributes: false,
|
||||
removeTagWhitespace: false,
|
||||
sortAttributes: false,
|
||||
sortClassName: false,
|
||||
useShortDoctype: false,
|
||||
},
|
||||
}),
|
||||
new HtmlWebpackPlugin(htmlConfig),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: "[name].css",
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user