Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/geovanisouza92/serverless-preval

How to apply babel-plugin-preval on a serverless project that uses webpack for bundling
https://github.com/geovanisouza92/serverless-preval

Last synced: 15 days ago
JSON representation

How to apply babel-plugin-preval on a serverless project that uses webpack for bundling

Awesome Lists containing this project

README

        

# serverless-preval

A simple example of how to apply [`babel-plugin-preval`](https://github.com/kentcdodds/babel-plugin-preval) to run JS snippets on build time. Making code simpler by removing unrelated (non business-related) code, with flexible and explicit manipulations. It's just JS there, you know?!

## About this example

It's a [serverless](https://serverless.com) project, using webpack to reduce bundle size.

The snippet read some (possible sensible) content from a file (`message.txt`), that will be placed inside the code. It uses `babel-node` for local development and `webpack` for production bundles.

## Contribution

Please, feel free to open issues with questions and suggestions.