summaryrefslogtreecommitdiff
path: root/scripts/copy_bundle_assets.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/copy_bundle_assets.js')
-rw-r--r--scripts/copy_bundle_assets.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/copy_bundle_assets.js b/scripts/copy_bundle_assets.js
index cb1ac197..e37e1700 100644
--- a/scripts/copy_bundle_assets.js
+++ b/scripts/copy_bundle_assets.js
@@ -18,10 +18,12 @@
// limitations under the License.
import { copyFileSync, existsSync, mkdirSync } from 'fs';
-import { join, basename } from 'path';
+import { dirname, join, basename } from 'path';
+import { fileURLToPath } from 'url';
import { glob } from 'glob';
-const root = join(import.meta.dirname, '..');
+const __dirname = dirname(fileURLToPath(import.meta.url));
+const root = join(__dirname, '..');
const bundleDir = join(root, 'bundle');
// Create the bundle directory if it doesn't exist