Skip to content

Commit

Permalink
chore: Upgrade Webpack 4 dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Jun 28, 2021
1 parent 5ad9b18 commit b45b65d
Show file tree
Hide file tree
Showing 4 changed files with 743 additions and 1,260 deletions.
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"@babel/preset-env": "7.14.7",
"@babel/preset-react": "7.14.5",
"@moonwalker/pre-flight-check": "1.3.5",
"assets-webpack-plugin": "5.1.1",
"assets-webpack-plugin": "5.1.2",
"async": "3.2.0",
"autoprefixer": "9.8.6",
"autoprefixer": "10.2.6",
"babel-jest": "27.0.5",
"babel-loader": "8.2.2",
"babel-plugin-graphql-tag": "3.3.0",
Expand All @@ -40,40 +40,41 @@
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"bundle-stats-webpack-plugin": "3.0.1",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "6.0.3",
"css-loader": "3.6.0",
"cssnano": "4.1.10",
"copy-webpack-plugin": "6.4.0",
"css-loader": "5.2.6",
"cssnano": "5.0.6",
"debug": "4.3.1",
"dotenv": "10.0.0",
"fetch-cached": "2.0.3",
"file-loader": "6.0.0",
"file-loader": "6.2.0",
"friendly-errors-webpack-plugin": "1.7.0",
"fs-extra": "10.0.0",
"generate-json-webpack-plugin": "1.0.0",
"graphql": "^15.3.0",
"graphql-tag": "^2.11.0",
"graphql": "15.5.1",
"graphql-tag": "2.12.4",
"html-minifier": "4.0.0",
"html-webpack-plugin": "4.3.0",
"html-webpack-plugin": "4.5.2",
"jest": "27.0.5",
"json-stringify-safe": "5.0.1",
"lodash": "4.17.21",
"mini-css-extract-plugin": "0.10.0",
"mini-css-extract-plugin": "1.6.0",
"node-fetch": "2.6.1",
"postcss-loader": "3.0.0",
"postcss-reporter": "6.0.1",
"postcss": "8.3.5",
"postcss-loader": "4.3.0",
"postcss-reporter": "7.0.2",
"promise-retry": "2.0.1",
"react-svg-loader": "3.0.3",
"source-map-loader": "^1.1.2",
"stats-webpack-plugin": "0.7.0",
"style-loader": "1.2.1",
"stylelint": "13.6.1",
"style-loader": "2.0.0",
"stylelint": "13.13.1",
"stylus": "0.54.8",
"stylus-loader": "3.0.2",
"terser-webpack-plugin": "4.2.3",
"webpack": "4.44.1",
"webpack-bundle-analyzer": "3.8.0",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0",
"webpack-bundle-analyzer": "4.4.2",
"webpack-cli": "4.7.2",
"webpack-dev-server": "3.11.2",
"webpack-merge": "4.2.2",
"workbox-webpack-plugin": "4.3.1",
"worker-farm": "1.7.0",
Expand Down
39 changes: 16 additions & 23 deletions src/webpack/config/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,31 @@ module.exports = (options, env) => {
{
loader: 'css-loader',
options: {
sourceMap: true,
onlyLocals: node,
modules: {
context: paths.src,
exportOnlyLocals: node,
localIdentContext: paths.src,
localIdentName: isDevelopment ? '[path][name]__[local]' : '[hash:base64:5]'
}
}
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
plugins: [
...(lint ? [stylelint()] : []),
autoprefixer(),
...(isDevelopment
? []
: [
cssnano({
postcssOptions: {
plugins: [
...(lint ? [stylelint()] : []),
autoprefixer(),
...(isDevelopment
? []
: [
// Avoid removing the relative (`./`) notation, webpack needs it
preset: [
'default',
{
normalizeUrl: false
}
]
})
]),
postcssReporter({
clearAllMessages: true
})
]
cssnano({ preset: ['default', { normalizeUrl: false }] })
]),
postcssReporter({
clearAllMessages: true
})
]
}
}
}
]
Expand Down
5 changes: 3 additions & 2 deletions src/webpack/config/stylus.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ module.exports = (options = {}) => {
enforce: 'pre',
loader: 'stylus-loader',
options: {
paths: include,
sourceMap: true
stylusOptions: {
paths: include
}
}
};

Expand Down
Loading

0 comments on commit b45b65d

Please sign in to comment.