
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@livingdocs/fastify-webpack
Advanced tools
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
More details will follow
We found that @livingdocs/fastify-webpack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.