Add _headers

This commit is contained in:
Ducko 2021-01-23 20:19:40 +00:00
parent 2b286229ac
commit f5f0efb1a2
2 changed files with 5 additions and 2 deletions

2
_headers Normal file
View file

@ -0,0 +1,2 @@
/*
Access-Control-Allow-Origin: *

View file

@ -2,7 +2,7 @@ import ModuleRepos from './modules.js';
import Parcel from 'parcel-bundler';
import { rmSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
import { rmSync, mkdirSync, readFileSync, writeFileSync, copyFileSync } from 'fs';
import { createHash } from 'crypto';
import { dirname } from 'path';
@ -100,4 +100,5 @@ for (const repo of ModuleRepos) {
}
}
writeFileSync(`${distDir}/modules.json`, JSON.stringify(moduleJson));
writeFileSync(`${distDir}/modules.json`, JSON.stringify(moduleJson));
copyFileSync(`${__dirname.replace('/src', '')}/_headers`, `${distDir}/_headers`);