Запуск безсерверного шаблона сборки Webpack в автономном режиме - PullRequest
1 голос
/ 23 мая 2019

Я начал работать с безсерверным сервером и хотел бы знать, почему я не могу запустить сборку Webpack без прохождения безсерверной инфраструктуры

  • webpack --version 4.32.0
  • npm - версия 6.9.0
  • без сервера - версия 1.43.0

serverless create --template aws-nodejs-typescript

Отсюда serverless deploy работает (и любые другиекоманда) но

webpack

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry should be one of these:
   function | object { <key>: non-empty string | [non-empty string] } | non-empty string | [non-empty string]
   -> The entry point(s) of the compilation.
   Details:
    * configuration.entry should be an instance of function
      -> A Function returning an entry object, an entry string, an entry array or a promise to these things.
    * configuration.entry should not be empty.
      -> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
    * configuration.entry should be a string.
      -> An entry point without name. The string is resolved to a module which is loaded upon startup.
    * configuration.entry should be an array:
      [non-empty string]

1 Ответ

0 голосов
/ 23 мая 2019

Похоже, что использование webpack без сервера не является стандартной конфигурацией webpack.Вы можете использовать serverless package вместо веб-пакета напрямую.

...