diff --git a/package.json b/package.json
index 7053410971..326879401a 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
"bootstrap": "lerna bootstrap",
"build": "lerna run build",
"format": "lerna run format",
- "postinstall": "husky install",
+ "postinstall": "npx husky install",
"lint": "lerna run lint",
"lint:fix": "lerna run lint:fix",
"pack": "lerna run pack",
@@ -48,7 +48,6 @@
"@storybook/addon-essentials": "^6.1.11",
"@storybook/addon-links": "^6.1.11",
"@storybook/html": "^6.1.11",
- "autoprefixer": "^10.1.0",
"babel-loader": "^8.2.2",
"chokidar-cli": "^2.1.0",
"cross-env": "^7.0.3",
@@ -58,9 +57,9 @@
"lerna": "^3.22.1",
"lint-staged": "^10.5.3",
"npm-run-all": "^4.1.5",
- "postcss": "^8.2.1",
- "postcss-cli": "^8.3.1",
- "postcss-import": "^14.0.0",
+ "postcss-cli": "^7.1.2",
+ "postcss-import": "^12.0.0",
+ "postcss-loader": "^4.1.0",
"prettier": "^2.2.1"
},
"licenses": [
diff --git a/packages/css/.storybook/main.js b/packages/css/.storybook/main.js
index 236afa03e7..05cfc4e236 100644
--- a/packages/css/.storybook/main.js
+++ b/packages/css/.storybook/main.js
@@ -1,3 +1,5 @@
+const path = require('path');
+
module.exports = {
stories: [
'../src/stories/*.stories.(mdx|js)',
@@ -9,4 +11,29 @@ module.exports = {
'@storybook/addon-essentials',
'@storybook/addon-storysource',
],
+ webpackFinal: async (config) => {
+ // Remove the current rules on CSS files ...
+ config.module.rules = config.module.rules.filter(({ test }) => !test.test(".css"));
+
+ // ... and replace by a new one, using postcss + our configuration for tailwind etc.
+ config.module.rules.push({
+ test: /\.css$/i,
+ use: [
+ "style-loader",
+ "css-loader",
+ "postcss-loader"
+ ],
+ });
+
+ // Add custom aliases
+
+ config.resolve = {
+ alias: {
+ "~": path.resolve(__dirname, "..")
+ }
+ };
+
+ // Return the altered config
+ return config;
+ },
};
diff --git a/packages/css/.storybook/preview-head.html b/packages/css/.storybook/preview-head.html
index 4c18d472df..f2e793c21b 100644
--- a/packages/css/.storybook/preview-head.html
+++ b/packages/css/.storybook/preview-head.html
@@ -6,7 +6,6 @@
href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,700&display=swap"
rel="stylesheet"
/>
-