
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
extract-text-plus-webpack-plugin
Advanced tools
var ExtractTextPlugin = require("extract-text-plus-webpack-plugin");
module.exports = {
module: {
loaders: [
{ test: /\.css$/, loader: ExtractTextPlusPlugin.extract("style-loader", "css-loader") }
]
},
plugins: [
new ExtractTextPlusPlugin("styles.css")
]
}
It moves every require("style.css")
in entry chunks into a separate css output file. So your styles are no longer inlined into the javascript, but separate in a css bundle file (styles.css
). If your total stylesheet volume is big, it will be faster because the stylesheet bundle is loaded in parallel to the javascript bundle.
Advantages:
devtool: "source-map"
and css-loader?sourceMap
)Caveats:
new ExtractPlusTextPlugin([id: string], filename: string, [options])
id
Unique ident for this plugin instance. (For advanded usage only, by default automatic generated)filename
the filename of the result file. May contain [name]
, [id]
and [contenthash]
.
[name]
the name of the chunk[id]
the number of the chunk[contenthash]
a hash of the content of the extracted fileoptions
allChunks
extract from all additional chunks too (by default it extracts only from the initial chunk(s))allEntries
extract from all entriesnameFilter
file name filter functiondisable
disables the pluginThe ExtractTextPlusPlugin
generates an output file per entry, so you must use [name]
, [id]
or [contenthash]
when using multiple entries.
ExtractTextPlusPlugin.extract([notExtractLoader], loader, [options])
Creates an extracting loader from an existing loader.
notExtractLoader
(optional) the loader(s) that should be used when the css is not extracted (i.e. in an additional chunk when allChunks: false
)loader
the loader(s) that should be used for converting the resource to a css exporting module.options
publicPath
override the publicPath
setting for this loader.There is also an extract
function on the instance. You should use this if you have more than one ExtractTextPlugin.
FAQs
Extract text plus from bundle into a file.
The npm package extract-text-plus-webpack-plugin receives a total of 7 weekly downloads. As such, extract-text-plus-webpack-plugin popularity was classified as not popular.
We found that extract-text-plus-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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.