Browse Source

Add _headers

main
Ducko 4 months ago
parent
commit
f5f0efb1a2
  1. 2
      _headers
  2. 5
      src/index.js

2
_headers

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

5
src/index.js

@ -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`);
Loading…
Cancel
Save