mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-17 22:34:23 +01:00
Fix clipboard for android
This commit is contained in:
committed by
Tony Giorgio
parent
d951fceaca
commit
de6cfa185c
17
insertHead.js
Normal file
17
insertHead.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import { readFile, writeFile } from 'fs/promises';
|
||||
import { join } from 'path';
|
||||
|
||||
const insertHeadTag = async () => {
|
||||
const filePath = join(process.cwd(), 'dist', 'public', 'index.html');
|
||||
try {
|
||||
let data = await readFile(filePath, 'utf8');
|
||||
const lines = data.split('\n');
|
||||
lines.splice(2, 0, '<head></head>');
|
||||
data = lines.join('\n');
|
||||
await writeFile(filePath, data);
|
||||
} catch (err) {
|
||||
console.error(`Error: ${err}`);
|
||||
}
|
||||
};
|
||||
|
||||
insertHeadTag();
|
||||
Reference in New Issue
Block a user