docusaurus-theme-openapi-docs 0.0.0-beta.628 → 0.0.0-beta.631

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.
package/lib/index.js CHANGED
@@ -31,30 +31,15 @@ function docusaurusThemeOpenAPI() {
31
31
  const {
32
32
  getStyleLoaders
33
33
  } = utils;
34
- const isProd = process.env.NODE_ENV === "production";
35
34
  return {
36
35
  plugins: [new NodePolyfillPlugin()],
37
36
  module: {
38
37
  rules: [{
39
- test: /\.s[ca]ss$/,
40
- oneOf: [{
41
- test: /\.module\.s[ca]ss$/,
42
- use: [...getStyleLoaders(isServer, {
43
- modules: {
44
- localIdentName: isProd ? `[local]_[hash:base64:4]` : `[local]_[path][name]`,
45
- exportOnlyLocals: isServer
46
- },
47
- importLoaders: 2,
48
- sourceMap: !isProd
49
- }), {
50
- loader: require.resolve("sass-loader"),
51
- options: {}
52
- }]
53
- }, {
54
- use: [...getStyleLoaders(isServer, {}), {
55
- loader: require.resolve("sass-loader"),
56
- options: {}
57
- }]
38
+ test: /styles.scss$/,
39
+ include: _path.default.resolve(__dirname, "theme", "styles.scss"),
40
+ use: [...getStyleLoaders(isServer, {}), {
41
+ loader: require.resolve("sass-loader"),
42
+ options: {}
58
43
  }]
59
44
  }]
60
45
  }
package/lib-next/index.js CHANGED
@@ -22,41 +22,18 @@ export default function docusaurusThemeOpenAPI() {
22
22
  },
23
23
  configureWebpack(_, isServer, utils) {
24
24
  const { getStyleLoaders } = utils;
25
- const isProd = process.env.NODE_ENV === "production";
26
25
  return {
27
26
  plugins: [new NodePolyfillPlugin()],
28
27
  module: {
29
28
  rules: [
30
29
  {
31
- test: /\.s[ca]ss$/,
32
- oneOf: [
30
+ test: /styles.scss$/,
31
+ include: path.resolve(__dirname, "theme", "styles.scss"),
32
+ use: [
33
+ ...getStyleLoaders(isServer, {}),
33
34
  {
34
- test: /\.module\.s[ca]ss$/,
35
- use: [
36
- ...getStyleLoaders(isServer, {
37
- modules: {
38
- localIdentName: isProd
39
- ? `[local]_[hash:base64:4]`
40
- : `[local]_[path][name]`,
41
- exportOnlyLocals: isServer,
42
- },
43
- importLoaders: 2,
44
- sourceMap: !isProd,
45
- }),
46
- {
47
- loader: require.resolve("sass-loader"),
48
- options: {},
49
- },
50
- ],
51
- },
52
- {
53
- use: [
54
- ...getStyleLoaders(isServer, {}),
55
- {
56
- loader: require.resolve("sass-loader"),
57
- options: {},
58
- },
59
- ],
35
+ loader: require.resolve("sass-loader"),
36
+ options: {},
60
37
  },
61
38
  ],
62
39
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-theme-openapi-docs",
3
3
  "description": "OpenAPI theme for Docusaurus.",
4
- "version": "0.0.0-beta.628",
4
+ "version": "0.0.0-beta.631",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -51,7 +51,7 @@
51
51
  "buffer": "^6.0.3",
52
52
  "clsx": "^1.1.1",
53
53
  "crypto-js": "^4.1.1",
54
- "docusaurus-plugin-openapi-docs": "0.0.0-beta.628",
54
+ "docusaurus-plugin-openapi-docs": "0.0.0-beta.631",
55
55
  "docusaurus-plugin-sass": "^0.2.3",
56
56
  "file-saver": "^2.0.5",
57
57
  "immer": "^9.0.7",
@@ -76,5 +76,5 @@
76
76
  "engines": {
77
77
  "node": ">=14"
78
78
  },
79
- "gitHead": "f298c0e99839b0c704983b2a54e7cce0af593268"
79
+ "gitHead": "c5908992bbf5a7f1067c890cf84bffc65dccbef1"
80
80
  }
package/src/index.ts CHANGED
@@ -30,41 +30,18 @@ export default function docusaurusThemeOpenAPI(): Plugin<void> {
30
30
 
31
31
  configureWebpack(_, isServer, utils) {
32
32
  const { getStyleLoaders } = utils;
33
- const isProd = process.env.NODE_ENV === "production";
34
33
  return {
35
34
  plugins: [new NodePolyfillPlugin()],
36
35
  module: {
37
36
  rules: [
38
37
  {
39
- test: /\.s[ca]ss$/,
40
- oneOf: [
38
+ test: /styles.scss$/,
39
+ include: path.resolve(__dirname, "theme", "styles.scss"),
40
+ use: [
41
+ ...getStyleLoaders(isServer, {}),
41
42
  {
42
- test: /\.module\.s[ca]ss$/,
43
- use: [
44
- ...getStyleLoaders(isServer, {
45
- modules: {
46
- localIdentName: isProd
47
- ? `[local]_[hash:base64:4]`
48
- : `[local]_[path][name]`,
49
- exportOnlyLocals: isServer,
50
- },
51
- importLoaders: 2,
52
- sourceMap: !isProd,
53
- }),
54
- {
55
- loader: require.resolve("sass-loader"),
56
- options: {},
57
- },
58
- ],
59
- },
60
- {
61
- use: [
62
- ...getStyleLoaders(isServer, {}),
63
- {
64
- loader: require.resolve("sass-loader"),
65
- options: {},
66
- },
67
- ],
43
+ loader: require.resolve("sass-loader"),
44
+ options: {},
68
45
  },
69
46
  ],
70
47
  },