
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
rollup-plugin-angular-inline
Advanced tools
Angular templateUrl and styleUrls inline for Rollup.
This approach will likely produce innaccurate sourcemaps.
A better approach is to inline templates/styles directly in the TypeScript sources, which guarantees sourcemaps will be correctly produced by TypeScript.
Such a build step can be found at https://github.com/filipesilva/angular-quickstart-lib.
Angular templateUrl and styleUrls inliner for Rollup, based on the
angular/material2
inlining script.
Also removes module.id
since it isn't needed afterwards.
Operates over transpiled JavaScript files so you need to provide include
globs to ensure
replacement is only happening on Angular Components.
Used after ngc
, to inline templates/styles for UMD bundles but still have es2015 files for
tree shaking.
npm install --save-dev rollup-plugin-angular-inline
// package.json
"scripts": {
"build": "ngc && rollup -c rollup-config.js",
}
// rollup-config.js
import angularInline from 'rollup-plugin-angular-inline';
export default {
entry: './src/index.js',
dest: './bundles/my-lib.umd.js',
format: 'umd',
moduleName: 'ng.my-lib',
globals: {
'@angular/core': 'ng.core'
},
plugins: [
angularInline({ include: './src/**/*.component.js' })
]
}
FAQs
Angular templateUrl and styleUrls inline for Rollup.
The npm package rollup-plugin-angular-inline receives a total of 56 weekly downloads. As such, rollup-plugin-angular-inline popularity was classified as not popular.
We found that rollup-plugin-angular-inline 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.