question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Webpack

See original GitHub issue

Is there anyway the subscribed function can be called using the webpack compiled code? Currently I am using serverless-offline and serverless-webpack which work great, but when I publish to the SNS topic subscribed by serverless-offline-sns, the handler function fails since its not using the webpack version:

import fetch from 'node-fetch';
^^^^^^
SyntaxError: Unexpected token import

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
todda00commented, Nov 5, 2017

Figured it out, the way the plugins are listed in serverless.yml matters, when I list them as follows all is well:

plugins:
  - serverless-webpack
  - serverless-offline
  - serverless-offline-sns

I’m sure the location also still had to change for this to work, but with the correct plugin order, its using the webpack modified location now.

2reactions
mj1618commented, Feb 14, 2018

All done

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Concepts - webpack
One of webpack's specific features is the ability to import any type of module, e.g. .css files, which may not be supported by...
Read more >
Modules - webpack
Supported Module Types ... Webpack supports the following module types natively: ... In addition to that webpack supports modules written in a variety...
Read more >
Module Methods - webpack
This section covers all methods available in code compiled with webpack. When using webpack to bundle your application, you can pick from a...
Read more >
Awesome webpack
A curated list of awesome webpack resources, libraries, tools and applications. It is inspired by the awesome list. Feel free to improve this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found