Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
babel-plugin-ng-hot-reload
Advanced tools
A babel plugin which enables hot module replacement in angular.js applications.
The plugin is based on the ng-hot-reload webpack loader but is rewritten as babel plugin so that it is compatible with es-module syntax and every bundler which supports the hot-replacement API (e.g. webpack or parcel).
To see it in action you can simply checkout the examples on CodeSandbox:
npm i -D babel-plugin-ng-hot-reload # npm or
yarn add -D babel-plugin-ng-hot-reload # yarn
Add the following to your babelrc.js
file:
// without options
module.exports = {
plugins: ['babel-plugin-ng-hot-reload'],
};
// with options
module.exports = {
plugins: [
[
'babel-plugin-ng-hot-reload',
{
angularGlobal: false,
forceRefresh: false,
preserveState: false,
},
],
],
};
@babel/preset-env
This plugin should be work nicly together with the @babel/preset-env
plugin.
In opposite to the original webpack-loader it's not required to transpile your code to commonjs modules:
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false, // Don't transpile the modules
},
],
],
plugins: ['babel-plugin-ng-hot-reload'],
};
For an example check out the Webpack / Javascript example.
When you are using this plugin together with babel-plugin-angularjs-annotate
make sure that the ngAnnotate plugin is added before this plugin in your .babelrc.js
:
module.exports = {
plugins: ['angularjs-annotate', 'babel-plugin-ng-hot-reload'],
};
For an example check out the Webpack / TypeScript example.
Felix Haus Website • Twitter |
---|
MIT - see LICENSE for details.
FAQs
Unknown package
We found that babel-plugin-ng-hot-reload 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.