
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
elm-css-webpack-loader
Advanced tools
Webpack loader for elm-css library
$ npm install --save-dev elm-css-webpack-loader
In your webpack.config.js
file:
module.exports = {
module: {
rules: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/, /Stylesheets\.elm$/],
use: [
'elm-hot-loader',
'elm-webpack-loader'
]
},
{
test: /Stylesheets\.elm$/,
use: [
'style-loader',
'css-loader',
'elm-css-webpack-loader'
]
}
]
}
};
See the examples section below for the complete webpack configuration.
You can add cache=true
to the loader:
...
loader: "elm-css-webpack?cache=true"
...
If you add this, when using npm run watch
, the loader will only load the
dependencies at startup. This could be performance improvement, but know that
new files won't be picked up and so won't be watched until you restart webpack.
This flag doesn't matter if you don't use watch mode.
You can find an example in the example
folder.
To run dev server:
$ npm install
$ npm run start
You can find a more advanced example at elm-bootstrap-webpack-starter
Even though elm-webpack-loader suggests to set the noParse
option,
elm-css-webpack-loader
requires to parse the stylesheet module.
You can work around the problem by using the following regular expression:
{
module: {
noParse: /^((?!Stylesheet).)*\.elm.*$/,
...
}
}
Initial release, compatible with elm-css-2.0.0
FAQs
elm-css webpack loader
The npm package elm-css-webpack-loader receives a total of 15 weekly downloads. As such, elm-css-webpack-loader popularity was classified as not popular.
We found that elm-css-webpack-loader 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.