File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 11{
2- "type" : " commonjs " ,
2+ "type" : " module " ,
33 "private" : true ,
44 "dependencies" : {
55 "@fastly/js-compute" : " ^3.33.2"
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}
Original file line number Diff line number Diff line change 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 : {
You can’t perform that action at this time.
0 commit comments