forked from CyberAgentHack/web-speed-hackathon-2021
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
不必要な CSS の削除 #9
Comments
yarn build時に以下の警告が出ている。
↓翻訳
提示されたURLに記載されている通り、purgeを設定してみる。 diff --git a/client/tailwind.config.js b/client/tailwind.config.js
index a4f9cbb..e99f9bf 100644
--- a/client/tailwind.config.js
+++ b/client/tailwind.config.js
@@ -1,3 +1,4 @@
module.exports = {
darkMode: false,
+ purge: ['./src/**/*.html', './src/**/*.jsx'],
}; もともと3MiBぐらいあったcssがめっちゃ軽くなった。
|
shun91
added a commit
that referenced
this issue
Dec 8, 2021
まだまだ不必要なCSSは多そうだが、ひとまず後回しにする。 |
shun91
added a commit
that referenced
this issue
Dec 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#2 から分離
https://github.com/CyberAgentHack/web-speed-hackathon-2020/wiki/Web-Speed-Hackathon-Online-%E5%87%BA%E9%A1%8C%E3%81%AE%E3%81%AD%E3%82%89%E3%81%84%E3%81%A8%E8%A7%A3%E8%AA%AC#%E4%B8%8D%E5%BF%85%E8%A6%81%E3%81%AA-css-%E3%81%AE%E5%89%8A%E9%99%A4
The text was updated successfully, but these errors were encountered: