File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed
Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 1212 - name : Setup Node
1313 uses : actions/setup-node@v3
1414 with :
15- node-version : ' 18 '
15+ node-version : ' 20.11 '
1616 - name : Setup Fastly CLI
1717 uses : fastly/compute-actions/setup@v5
1818 - name : Install Dependencies
Original file line number Diff line number Diff line change 11{
2- "engines" : {
3- "node" : " ^18"
2+ "type" : " module" ,
3+ "private" : true ,
4+ "dependencies" : {
5+ "@fastly/js-compute" : " ^3.33.2"
46 },
57 "devDependencies" : {
6- "@fastly/cli" : " ^10.14 .0" ,
8+ "@fastly/cli" : " ^11.0 .0" ,
79 "buffer" : " ^6.0.3" ,
810 "core-js" : " ^3.33.1" ,
911 "g" : " ^2.0.1" ,
1214 "path-browserify" : " ^1.0.1" ,
1315 "process" : " ^0.11.10" ,
1416 "stream-http" : " ^3.2.0" ,
15- "webpack" : " ^5.89 .0" ,
17+ "webpack" : " ^5.98 .0" ,
1618 "webpack-cli" : " ^5.1.4"
1719 },
18- "dependencies" : {
19- "@fastly/js-compute" : " ^3.0.0"
20- },
2120 "scripts" : {
2221 "prebuild" : " webpack" ,
2322 "build" : " js-compute-runtime bin/index.js bin/main.wasm" ,
2423 "start" : " fastly compute serve" ,
2524 "deploy" : " fastly compute publish"
25+ },
26+ "engines" : {
27+ "node" : " >= 20.11"
2628 }
2729}
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