Skip to content

Commit 69f8a43

Browse files
committed
Updates to make more correct
1 parent 6b01346 commit 69f8a43

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"type": "commonjs",
2+
"type": "module",
33
"private": true,
44
"dependencies": {
55
"@fastly/js-compute": "^3.33.2"
@@ -22,5 +22,8 @@
2222
"build": "js-compute-runtime bin/index.js bin/main.wasm",
2323
"start": "fastly compute serve",
2424
"deploy": "fastly compute publish"
25+
},
26+
"engines": {
27+
"node": ">= 20.11"
2528
}
2629
}

webpack.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
const path = require("path");
2-
const webpack = require("webpack");
1+
import { createRequire } from "module";
2+
import path from "path";
3+
import webpack from "webpack";
34

4-
module.exports = {
5+
const require = createRequire(import.meta.url);
6+
7+
export default {
58
entry: "./src/index.js",
69
optimization: {
710
minimize: true,
811
},
912
target: "webworker",
1013
output: {
1114
filename: "index.js",
12-
path: path.resolve(__dirname, "bin"),
15+
path: path.resolve(import.meta.dirname, "bin"),
1316
libraryTarget: "this",
1417
},
1518
module: {

0 commit comments

Comments
 (0)