1
Fork 0
This repository has been archived on 2024-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus-Polestar/build/prepare-production.js

12 lines
558 B
JavaScript
Raw Normal View History

2023-01-23 03:55:53 -05:00
// What's all this?
// When preparing your app for production, Astro needs to be built first.
2023-01-25 03:26:08 -05:00
// Astro builds with the index file pointing to the wrong path for CSS, as it's using "/_astro/" instead of "./_astro/", that one dot is important.
2023-01-23 03:55:53 -05:00
// 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({
2023-01-25 03:26:08 -05:00
regex: "/_astro/",
replacement: "./_astro/",
2023-01-23 03:55:53 -05:00
paths: ['./app/index.html'],
recursive: true,
silent: true,
});