Skip to content

Commit

Permalink
feat: 🎸 enable css modules
Browse files Browse the repository at this point in the history
  • Loading branch information
samAbeywickrama committed Jul 31, 2019
1 parent 5001980 commit bc7e28e
Show file tree
Hide file tree
Showing 5 changed files with 1,004 additions and 15 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-terser": "^5.1.1"
},
"husky": {
Expand Down
4 changes: 4 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import babel from "rollup-plugin-babel";
import resolve from "rollup-plugin-node-resolve";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import postcss from "rollup-plugin-postcss";
import { terser } from "rollup-plugin-terser";

const name = "Name";
Expand Down Expand Up @@ -31,6 +32,9 @@ export default {
plugins: [
peerDepsExternal(),
resolve(),
postcss({
modules: true
}),
babel({
exclude: "node_modules/**"
}),
Expand Down
9 changes: 9 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
html,
body {
padding: 0;
margin: 0;
background: tan;
display: flex;
vertical-align: center;
align-items: center;
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import "./index.css";

const MyComponent = () => <div>Hello there</div>;

Expand Down
Loading

0 comments on commit bc7e28e

Please sign in to comment.