Tidied up build directory

This commit is contained in:
n1474335 2019-04-14 21:55:52 +01:00
parent 8d0fcf37c5
commit 7163a0802d
2 changed files with 24 additions and 7 deletions

View file

@ -167,6 +167,9 @@ module.exports = function (grunt) {
}, moduleEntryPoints),
output: {
path: __dirname + "/build/prod",
filename: chunkData => {
return chunkData.chunk.name === "main" ? "assets/[name].js": "[name].js";
},
globalObject: "this"
},
resolve: {
@ -294,8 +297,8 @@ module.exports = function (grunt) {
// Add Structured Data for SEO
content = content.replace("</head>",
"<script type='application/ld+json'>" +
JSON.stringify(grunt.file.read("src/web/static/structuredData.json")) +
"</script>");
JSON.stringify(JSON.parse(grunt.file.read("src/web/static/structuredData.json"))) +
"</script></head>");
return grunt.template.process(content, srcpath);
} else {
return content;