Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@splice/angular-cli-wrapper
Advanced tools
Wraps Angular CLI in a loving stranglehold, and forces your Webpack config down its throat.
Install the package:
$ yarn add --dev @splice/angular-cli-wrapper
Initialize- this will create a default webpack-config.js
file in your project root:
$ yarn run splice-ng init
Modify any scripts in your package.json
that reference ng
(eg. ng serve
, ng build
) with splice-ng
(eg splice-ng serve
, splice-ng build
).
[TODO: This step will one day part of init
]
Angular CLI Wrapper lets you use on-disk paths in the src
attribute of img
tags (and any other attributes of other tags that you configure in webpack-config.js
). This means that references to images will be fingerprinted, and they'll respect the deployUrl
setting instead of being relative to /
.
Since the entire Webpack config is now available, you can feel free to modify it as needed for your particular application. Do be careful though- you don't want to do anything too crazy and run the risk of causing problems with Angular CLI.
Angular CLI Wrapper uses some Node Magic™ to hook into the module loading process and intercept the Angular CLI code responsible for loading Webpack configs. After the default config loading code runs, the entire configuration, along with the project's current build settings, are passed off to code in your application, providing you the opportunity to modify the Webpack config before the project is built.
The splice-ng init
command generates a default webpack-config.js
file that contains
one function, taking the existing config and build options, and returning a new config:
const merge = require('webpack-merge');
module.exports = function (originalConfig, buildOptions) {
let newConfig = merge.smart(originalConfig, {
module: {
rules: [
{ test: /\.html$/, loader: 'html-loader?-minimize&interpolate&attrs=img:src video:poster source:src' }
]
}
});
return newConfig;
}
The webpack-merge package is used which allows easy merging of Webpack configs without having to worry about unintentonally overwriting existing rules and settings.
FAQs
Splice wrapper for Angular CLI
The npm package @splice/angular-cli-wrapper receives a total of 1 weekly downloads. As such, @splice/angular-cli-wrapper popularity was classified as not popular.
We found that @splice/angular-cli-wrapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.