Skip to content

Commit 82d036a

Browse files
committed
fix: revert libs update
1 parent ba4fc12 commit 82d036a

File tree

5 files changed

+34
-37
lines changed

5 files changed

+34
-37
lines changed

CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5-
<a name="2.1.14"></a>
6-
## [2.1.14](http://next-css-unpluggable/compare/v2.1.13...v2.1.14) (2019-05-23)
7-
8-
9-
105
<a name="2.1.13"></a>
116
## [2.1.13](http://next-css-unpluggable/compare/v2.1.12...v2.1.13) (2019-04-01)
127

css-loader-config.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin')
2-
const findUp = require('find-up')
3-
const OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin')
1+
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
2+
const findUp = require('find-up');
3+
const OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin');
44

5-
const fileExtensions = new Set()
6-
let extractCssInitialized = false
5+
const fileExtensions = new Set();
6+
let extractCssInitialized = false;
77

88
module.exports = (
99
config,
@@ -19,7 +19,7 @@ module.exports = (
1919
) => {
2020
// We have to keep a list of extensions for the splitchunk config
2121
for (const extension of extensions) {
22-
fileExtensions.add(extension)
22+
fileExtensions.add(extension);
2323
}
2424

2525
if (!isServer && config.optimization.splitChunks.cacheGroups) {
@@ -28,7 +28,7 @@ module.exports = (
2828
test: new RegExp(`\\.+(${[...fileExtensions].join('|')})$`),
2929
chunks: 'all',
3030
enforce: true
31-
}
31+
};
3232
}
3333

3434
if (!isServer && !extractCssInitialized) {
@@ -44,42 +44,42 @@ module.exports = (
4444
: 'static/chunks/[name].[contenthash:8].chunk.css',
4545
hot: dev
4646
})
47-
)
48-
extractCssInitialized = true
47+
);
48+
extractCssInitialized = true;
4949
}
5050

5151
if (!dev) {
5252
if (!Array.isArray(config.optimization.minimizer)) {
53-
config.optimization.minimizer = []
53+
config.optimization.minimizer = [];
5454
}
5555
config.optimization.minimizer.push(
5656
new OptimizeCssAssetsWebpackPlugin({
5757
cssProcessorOptions: {
5858
discardComments: { removeAll: true }
5959
}
6060
})
61-
)
61+
);
6262
}
6363

6464
const postcssConfig = findUp.sync('postcss.config.js', {
6565
cwd: config.context
66-
})
67-
let postcssLoader
66+
});
67+
let postcssLoader;
6868

6969
if (postcssConfig) {
7070
// Copy the postcss-loader config options first.
7171
const postcssOptionsConfig = Object.assign(
7272
{},
7373
postcssLoaderOptions.config,
7474
{ path: postcssConfig }
75-
)
75+
);
7676

7777
postcssLoader = {
7878
loader: 'postcss-loader',
7979
options: Object.assign({}, postcssLoaderOptions, {
8080
config: postcssOptionsConfig
8181
})
82-
}
82+
};
8383
}
8484

8585
const cssLoader = {
@@ -97,22 +97,23 @@ module.exports = (
9797
},
9898
cssLoaderOptions
9999
)
100-
}
100+
};
101101

102102
// When not using css modules we don't transpile on the server
103103
if (isServer && !cssLoader.options.modules) {
104-
return ['ignore-loader']
104+
return ['ignore-loader'];
105105
}
106106

107107
// When on the server and using css modules we transpile the css
108108
if (isServer && cssLoader.options.modules) {
109-
return [cssLoader, postcssLoader, ...loaders].filter(Boolean)
109+
return [cssLoader, postcssLoader, ...loaders].filter(Boolean);
110110
}
111111

112112
return [
113113
!isServer && dev && 'extracted-loader',
114114
!isServer && ExtractCssChunks.loader,
115115
cssLoader,
116+
postcssLoader,
116117
...loaders
117-
].filter(Boolean)
118-
}
118+
].filter(Boolean);
119+
};

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = (nextConfig = {}) => {
1212
const { dev, isServer } = options
1313
const { cssLoaderOptions, postcssLoaderOptions } = nextConfig
1414

15-
const createStyleConfig = (cssModules) =>
15+
const createStyleConfig = cssModules =>
1616
(options.defaultLoaders.css = cssLoaderConfig(config, {
1717
extensions: ['css'],
1818
cssModules,

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next-css-unpluggable",
3-
"version": "2.1.14",
3+
"version": "2.1.13",
44
"main": "index.js",
55
"license": "MIT",
66
"repository": "next-css-unpluggable",
@@ -9,8 +9,8 @@
99
},
1010
"dependencies": {
1111
"css-loader": "^2.1.1",
12-
"extract-css-chunks-webpack-plugin": "^4.5.1",
13-
"extracted-loader": "^1.0.7",
12+
"extract-css-chunks-webpack-plugin": "^4.2.0",
13+
"extracted-loader": "1.0.4",
1414
"find-up": "2.1.0",
1515
"ignore-loader": "0.1.2",
1616
"optimize-css-assets-webpack-plugin": "^5.0.1",

yarn.lock

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,20 +1784,21 @@ extglob@^2.0.4:
17841784
snapdragon "^0.8.1"
17851785
to-regex "^3.0.1"
17861786

1787-
extract-css-chunks-webpack-plugin@^4.5.1:
1788-
version "4.5.1"
1789-
resolved "https://registry.yarnpkg.com/extract-css-chunks-webpack-plugin/-/extract-css-chunks-webpack-plugin-4.5.1.tgz#b69be9d22297502ae55c77b5b8f2edf82fa47130"
1790-
integrity sha512-SMTguWPSE3nqLFhf9wVNbGg4LKSOolj2/C/WtWIKNDOh7Cc68leo/270N4HPCwwcnZs7zxw9zS+e5n1gynw1Gw==
1787+
extract-css-chunks-webpack-plugin@^4.2.0:
1788+
version "4.2.0"
1789+
resolved "https://registry.yarnpkg.com/extract-css-chunks-webpack-plugin/-/extract-css-chunks-webpack-plugin-4.2.0.tgz#e23bdb40cbfecfabf1affe5798b27be9625a25bc"
1790+
integrity sha512-ws8uIGdkKSa2TyDcdX70eo3uuBSHvp3hbeiqKaBHGIFEVBRWLk9gpLL09QoJN45FfgrXGl6D48NkOnhi2vuuXg==
17911791
dependencies:
17921792
loader-utils "^1.1.0"
1793+
lodash "^4.17.11"
17931794
normalize-url "^2.0.1"
17941795
schema-utils "^1.0.0"
17951796
webpack-sources "^1.1.0"
17961797

1797-
extracted-loader@^1.0.7:
1798-
version "1.0.7"
1799-
resolved "https://registry.yarnpkg.com/extracted-loader/-/extracted-loader-1.0.7.tgz#80ee335be54c8f45d649e3362d5ae6bb46686067"
1800-
integrity sha512-70ynm4CxHhoXkFS1TOoqIesH+xc7l0sqj8C3i9gQklkAhNZjgSafgVuRJyGmD1lROgP1Ft3z2ONP88XJbAJiow==
1798+
1799+
version "1.0.4"
1800+
resolved "https://registry.yarnpkg.com/extracted-loader/-/extracted-loader-1.0.4.tgz#e1a3f1791813c14091a1959e261e23e95dd90115"
1801+
integrity sha512-G8A0hT/WCWIjesZm7BwbWdST5dQ08GNnCpTrJT/k/FYzuiJwlV1gyWjnuoizOzAR4jpEYXG2J++JyEKN/EB26Q==
18011802

18021803
fast-deep-equal@^2.0.1:
18031804
version "2.0.1"

0 commit comments

Comments
 (0)