refactor(config): migrate configuration files to ES module syntax
- Updated jest.config.js, postcss.config.js, and tailwind.config.js to use ES module export syntax. - Added "type": "module" to package.json to support ES module imports. - Refactored copy-tinymce.js to utilize ES module imports and defined __dirname for compatibility.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
// Get __dirname equivalent for ES modules
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
// Create the directory if it doesn't exist
|
||||
const targetDir = path.join(__dirname, '..', 'public', 'tinymce');
|
||||
|
||||
Reference in New Issue
Block a user