fix copying files from examples

This commit is contained in:
Jason Gao 2023-02-26 11:04:37 -05:00
parent 26dde04c3c
commit 683a6a5272

View file

@ -11,6 +11,10 @@ exports.onCreateDevServer = ({ app }) => {
};
// Copy examples to the public folder
exports.onPostBuild = () => {
fs.copy('content/examples', 'public/examples/');
exports.onPostBuild = async () => {
try {
await fs.copy('content/examples', 'public/examples/');
} catch (err) {
console.error(err);
}
};