Move prepare script to build folder
This commit is contained in:
parent
7d3f3d5ead
commit
685ebedc2d
1 changed files with 12 additions and 0 deletions
12
build/prepare-production.js
Normal file
12
build/prepare-production.js
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
// What's all this?
|
||||||
|
// When preparing your app for production, Astro needs to be built first.
|
||||||
|
// Astro builds with the index file pointing to the wrong path for CSS, as it's using "/assets/" instead of "./assets/", that one dot is important.
|
||||||
|
// This file will quickly fix that for you, also it's part of the `yarn build` command so you don't need to worry about it each time you build.
|
||||||
|
var replace = require("replace");
|
||||||
|
replace({
|
||||||
|
regex: "/assets/",
|
||||||
|
replacement: "./assets/",
|
||||||
|
paths: ['./app/index.html'],
|
||||||
|
recursive: true,
|
||||||
|
silent: true,
|
||||||
|
});
|
Reference in a new issue