Skip to content

Commit

Permalink
Feature/enable browserslist support (#4250)
Browse files Browse the repository at this point in the history
* use webpack-dev-server 4

* fix devServer

* add .browserslistrc

* use browserslist

* fix svg height for safari
  • Loading branch information
chenxsan authored Dec 5, 2020
1 parent e455a35 commit a2864b8
Show file tree
Hide file tree
Showing 7 changed files with 262 additions and 392 deletions.
2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
defaults
not ie 11
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"webpack": "^5.9.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.2.1",
"webpack-dev-server": "^4.0.0-beta.0",
"webpack-merge": "^5.1.4",
"workbox-webpack-plugin": "^6.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Print/Print.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function Print (props) {

return (
<div className="sidebar-item sidebar-item--disabled`">
<BarIcon className="sidebar-item__toggle" width={15} fill="#175d96" />
<BarIcon className="sidebar-item__toggle" width={15} height={17} fill="#175d96" />
<a className="sidebar-item__title sidebar-link__print"
href={printUrl}
rel="nofollow noopener noreferrer"
Expand Down
3 changes: 2 additions & 1 deletion src/components/SidebarItem/SidebarItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ export default class SidebarItem extends Component {
{anchors.length > 0 ? (
<ChevronRightIcon
width={15}
height={17}
fill="#175d96"
className={`${block}__toggle`}
onClick={this._toggle.bind(this)} />
) : (
<BarIcon className={`${block}__toggle`} width={15} fill="#175d96" />
<BarIcon className={`${block}__toggle`} width={15} height={17} fill="#175d96" />
)}

<Link
Expand Down
3 changes: 1 addition & 2 deletions webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ module.exports = env => merge(common(env), {
})
],
devServer: {
contentBase: path.resolve(__dirname, './dist'),
static: path.resolve(__dirname, './dist'),
port: 3000,
hot: true,
inline: true,
compress: true,
historyApiFallback: true
}
Expand Down
1 change: 0 additions & 1 deletion webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const common = require('./webpack.common.js');

module.exports = env => merge(common(env), {
mode: 'production',
target: 'web',
cache: {
buildDependencies: {
config: [__filename],
Expand Down
Loading

1 comment on commit a2864b8

@vercel
Copy link

@vercel vercel bot commented on a2864b8 Dec 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.