Skip to content

Commit

Permalink
chore: reduce popup size (nsfw-filter#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzevm authored Oct 3, 2021
1 parent b91ac6f commit 07630fa
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 31 deletions.
142 changes: 120 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/popup/components/Footer/styles.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'antd/lib/checkbox/style/index.css'

import Checkbox from 'antd/lib/checkbox'
import styled from 'styled-components'

Expand Down
3 changes: 3 additions & 0 deletions src/popup/components/Production/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'antd/lib/select/style/index.css'
import 'antd/lib/slider/style/index.css'

import Select from 'antd/lib/select'
import Slider from 'antd/lib/slider'
import React from 'react'
Expand Down
2 changes: 1 addition & 1 deletion src/popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'

import 'antd/dist/antd.min.css'
import 'antd/lib/style/index.css'

import { Popup } from './components'
import { createChromeStore } from './redux/chrome-storage'
Expand Down
15 changes: 7 additions & 8 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path')
const glob = require('glob')
const CopyPlugin = require('copy-webpack-plugin')
const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const MiniCSSExtractPlugin = require('mini-css-extract-plugin')
const PurgeCSSPlugin = require('purgecss-webpack-plugin')

const PATHS = {
Expand Down Expand Up @@ -35,7 +35,6 @@ module.exports = {
test: /\.css$/,
use: [
"style-loader",
// MiniCssExtractPlugin.loader,
"css-loader"
]
}
Expand All @@ -48,12 +47,12 @@ module.exports = {
],
}),
new AntdDayjsWebpackPlugin(),
// new MiniCssExtractPlugin({
// filename: "[name].css",
// }),
// new PurgeCSSPlugin({
// paths: glob.sync(`${PATHS.src}/**/*`, { nodir: true }),
// }),
new MiniCSSExtractPlugin({
filename: "[name].css",
}),
new PurgeCSSPlugin({
paths: glob.sync(`${PATHS.src}/**/*`, { nodir: true }),
}),
],
resolve: {
extensions: [".js", ".ts", ".tsx"]
Expand Down

0 comments on commit 07630fa

Please sign in to comment.