Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-webpack

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-webpack

Webpack plugin for server side rendering on fastify

  • 0.0.1-alpha.4
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

fastify-webpack

A fastify plugin for serving webpack bundles. This should be used for development only.

fastify-webpack is very inspired by webpack-dev-middleware and borrows a lot of code from it's codebase. Thanks to those who contribute to that project.

Usage

Options

index

serverSideRender

Type: boolean Default: undefined

Instructs the plugin to enable or disable server-side rendering mode. Please see Server-Side Rendering for more information.

Server-Side Rendering

If you're server-side rendering your webpack application, that means you need to render HTML markup on the server before sending it to your clients. During development the HTML to be rendered will be changing whenever you make changes to your application.

fastify-webpack will create a new bundle(s) for every change to your code using webpack's watch mode. Whenever fastify-webpack handles a new request, instead of searching for the file within its internal filesystem and serving it via fastify's reply object instead the fastify-webpack plugin will decorate the request object with the entire bundle's output using hooks.

This streamlines your fastify server-side rendering code during development:

  • You don't need a separate webpack building process in addition to running your server.
  • You don't need something like the webpack manifest plugin to identify where your bundle(s) is output or named: fastify-webpack makes the output identifiable with the [asset's name]](https://webpack.js.org/api/stats#asset-objects).

FAQs

Package last updated on 06 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc