-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use npx next build with fastly's js sdk #17
Comments
Hi @fussybeaver, thank you for reporting this issue. Could you please post your externals: [
({request,}, callback) => {
// Allow Webpack to handle fastly:* namespaced module imports by treating
// them as modules rather than try to process them as URLs
if (/^fastly:.*$/.test(request)) {
return callback(null, 'commonjs ' + request);
}
callback();
}
], |
Thanks for the hint. In this case, I am using the one in this repository: https://github.com/fastly/next-compute-js/blob/main/examples/my-app/next.config.js I've added the externals stub, but it complains of an unexpected property. This is using next
Do I need to use a specific webpack version ? I can see some documentation on the externals field when I google around. |
Hi @fussybeaver, apologies for the delay in responding. I think you'll need to update |
Following the instructions to use edge dictionaries, this is also reproducible in this repository's example project.
In
package.json
:In e.g.
_app.js
:tsc
compiles fine.webpack
does not:What's the recommended approach?
The text was updated successfully, but these errors were encountered: