cloudflare / serverless-cloudflare-workers

Serverless provider plugin for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
175 stars 37 forks source link

unrecognized property 'webpackConfig' #75

Open mikeumus opened 1 year ago

mikeumus commented 1 year ago

npx serverless invoke -f hello -d '{"hello":"world"}'

> $ npx serverless invoke -f hello -d '{"hello":"world"}'                                    ⬡ 18.12.1 
Warning: You're relying on provider "cloudflare" defined by a plugin which doesn't provide a validation schema for its config.
Please report the issue at its bug tracker linking: https://www.serverless.com/framework/docs/providers/aws/guide/plugins#extending-validation-schema
You may turn off this message with "configValidationMode: off" setting

Warning: Invalid configuration encountered
  at root: unrecognized property 'webpackConfig'

Learn more about configuration validation here: http://slss.io/configuration-validation
Environment: darwin, node 18.12.1, framework 3.25.1, plugin 6.2.2, SDK 4.3.2
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

serverless.yml

service: token-portal-api
webpackConfig: webpack.config #webpack config path without js extension from root folder.

frameworkVersion: '3'

provider:
  name: cloudflare
  config:
    accountId: ${file(./.envs/.production/serverless-prod.yml):CLOUDFLARE_ACCOUNT_ID} 
    zoneId: ${file(./.envs/.production/serverless-prod.yml):CLOUDFLARE_ZONE_ID} 

plugins:
  - serverless-cloudflare-workers

custom:
  domain: portal.api.com

functions:
  hello:
    name: hello
    webpack: webpack.config.js
    script: helloWorld
    events:
      - http:
          url: ${self:custom.domain}/hello/*
          method: GET

    resources:
      wasm:
        - variable: WASM
          file: rust-wasm/pkg/rust_wasm_bg.wasm