@docusaurus/core 0.0.0-6055 → 0.0.0-6058

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/webpack/utils.js +9 -14
  2. package/package.json +13 -12
@@ -50,6 +50,8 @@ function getStyleLoaders(isServer, cssOptionsArg = {}) {
50
50
  esModule: false,
51
51
  ...cssOptionsArg,
52
52
  };
53
+ // On the server we don't really need to extract/emit CSS
54
+ // We only need to transform CSS module imports to a styles object
53
55
  if (isServer) {
54
56
  return cssOptions.modules
55
57
  ? [
@@ -58,20 +60,8 @@ function getStyleLoaders(isServer, cssOptionsArg = {}) {
58
60
  options: cssOptions,
59
61
  },
60
62
  ]
61
- : [
62
- {
63
- loader: mini_css_extract_plugin_1.default.loader,
64
- options: {
65
- // Don't emit CSS files for SSR (previously used null-loader)
66
- // See https://github.com/webpack-contrib/mini-css-extract-plugin/issues/90#issuecomment-811991738
67
- emit: false,
68
- },
69
- },
70
- {
71
- loader: require.resolve('css-loader'),
72
- options: cssOptions,
73
- },
74
- ];
63
+ : // Ignore regular CSS files
64
+ [{ loader: require.resolve('null-loader') }];
75
65
  }
76
66
  return [
77
67
  {
@@ -84,6 +74,11 @@ function getStyleLoaders(isServer, cssOptionsArg = {}) {
84
74
  loader: require.resolve('css-loader'),
85
75
  options: cssOptions,
86
76
  },
77
+ // TODO apart for configurePostCss(), do we really need this loader?
78
+ // Note: using postcss here looks inefficient/duplicate
79
+ // But in practice, it's not a big deal because css-loader also uses postcss
80
+ // and is able to reuse the parsed AST from postcss-loader
81
+ // See https://github.com/webpack-contrib/css-loader/blob/master/src/index.js#L159
87
82
  {
88
83
  // Options for PostCSS as we reference these options twice
89
84
  // Adds vendor prefixing based on your specified browser support in
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "0.0.0-6055",
4
+ "version": "0.0.0-6058",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,12 +43,12 @@
43
43
  "@babel/runtime": "^7.22.6",
44
44
  "@babel/runtime-corejs3": "^7.22.6",
45
45
  "@babel/traverse": "^7.22.8",
46
- "@docusaurus/cssnano-preset": "0.0.0-6055",
47
- "@docusaurus/logger": "0.0.0-6055",
48
- "@docusaurus/mdx-loader": "0.0.0-6055",
49
- "@docusaurus/utils": "0.0.0-6055",
50
- "@docusaurus/utils-common": "0.0.0-6055",
51
- "@docusaurus/utils-validation": "0.0.0-6055",
46
+ "@docusaurus/cssnano-preset": "0.0.0-6058",
47
+ "@docusaurus/logger": "0.0.0-6058",
48
+ "@docusaurus/mdx-loader": "0.0.0-6058",
49
+ "@docusaurus/utils": "0.0.0-6058",
50
+ "@docusaurus/utils-common": "0.0.0-6058",
51
+ "@docusaurus/utils-validation": "0.0.0-6058",
52
52
  "autoprefixer": "^10.4.14",
53
53
  "babel-loader": "^9.1.3",
54
54
  "babel-plugin-dynamic-import-node": "^2.3.3",
@@ -77,6 +77,7 @@
77
77
  "leven": "^3.1.0",
78
78
  "lodash": "^4.17.21",
79
79
  "mini-css-extract-plugin": "^2.7.6",
80
+ "null-loader": "^4.0.1",
80
81
  "p-map": "^4.0.0",
81
82
  "postcss": "^8.4.26",
82
83
  "postcss-loader": "^7.3.3",
@@ -90,7 +91,7 @@
90
91
  "react-router-dom": "^5.3.4",
91
92
  "rtl-detect": "^1.0.4",
92
93
  "semver": "^7.5.4",
93
- "serve-handler": "^6.1.5",
94
+ "serve-handler": "npm:@docusaurus/serve-handler@6.2.0",
94
95
  "shelljs": "^0.8.5",
95
96
  "terser-webpack-plugin": "^5.3.10",
96
97
  "tslib": "^2.6.0",
@@ -103,14 +104,14 @@
103
104
  "webpackbar": "^5.0.2"
104
105
  },
105
106
  "devDependencies": {
106
- "@docusaurus/module-type-aliases": "0.0.0-6055",
107
- "@docusaurus/types": "0.0.0-6055",
107
+ "@docusaurus/module-type-aliases": "0.0.0-6058",
108
+ "@docusaurus/types": "0.0.0-6058",
108
109
  "@total-typescript/shoehorn": "^0.1.2",
109
110
  "@types/detect-port": "^1.3.3",
110
111
  "@types/react-dom": "^18.2.7",
111
112
  "@types/react-router-config": "^5.0.7",
112
113
  "@types/rtl-detect": "^1.0.0",
113
- "@types/serve-handler": "^6.1.1",
114
+ "@types/serve-handler": "^6.1.4",
114
115
  "@types/update-notifier": "^6.0.4",
115
116
  "@types/webpack-bundle-analyzer": "^4.6.0",
116
117
  "react-test-renderer": "^18.0.0",
@@ -131,5 +132,5 @@
131
132
  "engines": {
132
133
  "node": ">=18.0"
133
134
  },
134
- "gitHead": "b57b82e42ebabf1864ac745b95199ff62fb289af"
135
+ "gitHead": "1108fcbe4d387e2e3d0195d91157a968275970b3"
135
136
  }