
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@fivethreeo/start-server-webpack-plugin
Advanced tools
Automatically start your server once Webpack's build completes.
Automatically start your server once Webpack's build completes + handle hot reloading (HMR)
$ npm install --save-dev start-server-webpack-plugin
In webpack.config.server.babel.js
:
import StartServerPlugin from "start-server-webpack-plugin";
export default {
...
plugins: [
...
// Only use this in DEVELOPMENT
new StartServerPlugin({
// print server logs
verbose: true,
// print plugin/server errors
debug: false,
// name of the entry to run, defaults to 'main'
entryName: 'server',
// any arguments to nodejs when running the entry, this one allows debugging
nodeArgs: ['--inspect-brk'],
// any arguments to pass to the script
scriptArgs: ['scriptArgument1', 'scriptArgument2'],
// Allow typing 'rs' to restart the server. default: only if NODE_ENV is 'development'
restartable: true | false,
// Only run the server once (default: false)
once: false | true,
}),
...
],
...
}
The entryName
argument defaults to "main"
, which is the name Webpack uses if you use the string or array versions of the entry
option.
You can use nodeArgs
and args
to pass arguments to node and your script, respectively. For example, you can use this to use the node debugger.
To use Hot Module Reloading with your server code, set Webpack to "hot" and "watch" modes.
This plugin appends some code to the end of the entry so that it can handle HMR and restarts; no need to add any of the webpack/hot
modules.
name
option and define entryName
if it's not just "main"
MIT License 2016-2018 © Eric Clemmons
FAQs
Automatically start your server once Webpack's build completes.
The npm package @fivethreeo/start-server-webpack-plugin receives a total of 1 weekly downloads. As such, @fivethreeo/start-server-webpack-plugin popularity was classified as not popular.
We found that @fivethreeo/start-server-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.