Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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 15 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.