Skip to content

Instantly share code, notes, and snippets.

@tivac
Created November 6, 2018 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tivac/a07d38ada6f3119aa663da7760f822bb to your computer and use it in GitHub Desktop.
Save tivac/a07d38ada6f3119aa663da7760f822bb to your computer and use it in GitHub Desktop.
modular-css issue #525
  1. npm install
  2. npm start
  3. Check ./dist folder, it should have a bundle.js and an assets/bundle-<hash>.css file. (Mine was bundle-d363bc08.css).
  4. Change index.js
  5. Check the ./dist/assets folder again. Has the css file changed its hash?
.one {
color: olive;
}
const css = import("./index.css");
console.log(3, css);
{
"name": "rollup-hashing",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "rollup --config --watch"
},
"license": "UNLICENSED",
"devDependencies": {
"@modular-css/rollup": "^17.0.0",
"rollup": "^0.67.0"
}
}
module.exports = {
input : "index.js",
output : {
file : "dist/bundle.js",
format : "esm"
},
plugins : [
require("@modular-css/rollup")()
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment