You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@livingdocs/fastify-webpack

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livingdocs/fastify-webpack

More details will follow

5.0.1
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

@livingdocs/fastify-webpack

More details will follow

npm install fastify @livingdocs/fastify-webpack
npm install --save-dev fastify-webpack-hmr
const fastify = require('fastify')
const fastifyWebpack = require('@livingdocs/fastify-webpack')

const watch = process.argv.slice(2).includes('watch')
const optimized = process.argv.slice(2).includes('optimize')

fastify.register(fastifyWebpack, {
  watch,
  // Force the expiration when `watch` isn't true
  maxAge: '1y',
  // we can define the cdnurl
  cdnUrl: 'https://somecdn.yourproject.com',
  // optional, by default it uses webpack.config.js
  webpackConfig: require('./custom-webpack-config')
})

fastify.get('/', fastify.webpackHtml({
  body: '<h1>Hello</h1>'
}))
const fastifyWebpack = require('@livingdocs/fastify-webpack')
module.exports = {
  context: __dirname,
  mode: optimized ? 'production' : 'development',
  stats: false,
  entry: {
    index: './src/index.js'
  },
  output: {
    // make sure that there's no `/` in the front, so all the assets
    // are referenced using relative urls.
    // This allows us to host the files anywhere on any url, even subdirectories
    publicPath: 'assets/',
    filename: optimized ? '[name].[contenthash].js' : '[name].[hash].js',
    chunkFilename: optimized ? '[name].[contenthash].js' : '[name].[hash].js'
  },
  plugins: [new fastifyWebpack.AssetManifestPlugin()]
}

FAQs

Package last updated on 23 Jul 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.