New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@intouchg/fastify-webpack-hot

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intouchg/fastify-webpack-hot

Webpack hot reloading plugin for NodeJS Fastify server

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@intouchg/fastify-webpack-hot

Allows using a NodeJS Fastify server for development with Webpack hot reloading when NODE_ENV=development

Register the plugin with Fastify and set the configPath option to the absolute filepath of your Webpack config file

Make sure the output.publicPath option has been set in your Webpack config

yarn add fastify
yarn add --dev @intouchg/fastify-webpack-hot nodemon
// package.json
{
	"scripts": {
		"dev": "NODE_ENV=development nodemon -w server.js"
	},
	"dependencies": {
		"fastify": "3.25.1"
	},
	"devDependencies": {
		"@intouchg/fastify-webpack-hot": "latest",
		"nodemon": "2.0.15"
	}
}
// server.js
const fastify = require('fastify')({ logger: true })
const path = require('path')

// Only require the plugin when NODE_ENV=development.
// This is not strictly necessary, the plugin does its
// own internal check for NODE_ENV=development.
if (process.env.NODE_ENV === 'development') {
	fastify.register(
		require('@intouchg/fastify-webpack-hot'),
		{ configPath: path.resolve(__dirname, 'webpack.config.js') }
	)
}

fastify.get('/', (request, reply) => reply.send({ hello: 'world' }))

fastify.listen(3000, (error, address) => {
	if (error) throw error
	console.log('Fastify server is listening on ' + address)
})

FAQs

Package last updated on 21 Dec 2021

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