fullhuman / rollup-plugin-purgecss Goto Github PK
View Code? Open in Web Editor NEWRollup plugin to remove unused css
License: MIT License
Rollup plugin to remove unused css
License: MIT License
Why does rollup-plugin-purgecss write js to the purged css files?
The purged css is wrapped in export default "..."
.
/* main.css */
.div{background-color:black} ....
/* main.css */
export default ".div{background-color:black}...."
Branch | Build failing π¨ |
---|---|
Dependency | rollup-plugin-commonjs |
Current Version | 9.1.4 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
rollup-plugin-commonjs is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 8 commits.
b5c719f
9.1.5
81bea94
Merge branch 'mister-what-master'
b1cd440
Fix linting and slightly clean up code
e709667
9.1.4
2dcfd2b
Update changelog
25d6af0
Make "from" a reserved word (#320)
93f4ce4
input files as object - fixing and adding tests
a5e5bcd
allow input files to be an object (i.e. named entrypoints)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
How can I import the CSS into the JS file and then extract it into the dist directory purged of unused CSS with this plugin?
I have been using rollup-plugin-postcss
and all that is needed is:
main.js
------------
import '../src/main.css';`
rollup.config.js
--------------------
import postcss from 'rollup-plugin-postcss';
export default {
input: 'src/main.js',
output: {
file: 'dist/bundle.js',
format: 'iife',
sourcemap: true,
},
plugins: [
postcss({
sourceMap: true,
extract: true,
minimize: true,
}),
],
};
I am not quite sure how this plugin is meant to function? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.