Fix build script to use ES modules instead of CommonJS
Some checks failed
Build and Push Docker Images / docker (push) Failing after 2m13s
Some checks failed
Build and Push Docker Images / docker (push) Failing after 2m13s
Convert inject-sw-version.js to ES module syntax since package.json has "type": "module". This fixes the build error in Docker. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a279bb6aa9
commit
207fb261e6
@ -6,9 +6,13 @@
|
|||||||
* to force cache invalidation on new deployments
|
* to force cache invalidation on new deployments
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
import fs from 'fs';
|
||||||
const path = require('path');
|
import path from 'path';
|
||||||
const { execFileSync } = require('child_process');
|
import { execFileSync } from 'child_process';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
const SW_SOURCE = path.join(__dirname, '..', 'public', 'sw.js');
|
const SW_SOURCE = path.join(__dirname, '..', 'public', 'sw.js');
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user