react-cosmos-plugin-rspack 0.0.1 → 0.2.0

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.
@@ -275,10 +275,9 @@ function getDefaultRspackConfig(rootDir) {
275
275
  type: "javascript/auto"
276
276
  });
277
277
  rules.push({
278
- test: /\.css?$/,
279
- exclude: [/[\\/]node_modules[\\/]/],
280
- use: postcssLoaderPath ? [{ loader: postcssLoaderPath }] : void 0,
281
- type: "css"
278
+ test: /\.css$/,
279
+ use: postcssLoaderPath ? [{ loader: postcssLoaderPath }] : [{ loader: "builtin:lightningcss-loader" }],
280
+ type: "css/auto"
282
281
  });
283
282
  if (mdxLoaderPath) {
284
283
  rules.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-cosmos-plugin-rspack",
3
- "version": "0.0.1",
3
+ "version": "0.2.0",
4
4
  "description": "rspack plugin for React Cosmos",
5
5
  "repository": "https://github.com/birchill/react-cosmos-plugin-rspack/",
6
6
  "author": "Birchill, Inc.",
@@ -12,12 +12,13 @@
12
12
  ],
13
13
  "type": "module",
14
14
  "dependencies": {
15
+ "react-cosmos-dom": ">=6.0.0",
15
16
  "webpack-dev-middleware": "7.2.1",
16
17
  "webpack-hot-middleware": "2.26.1"
17
18
  },
18
19
  "devDependencies": {
19
20
  "@release-it/conventional-changelog": "8.0.1",
20
- "@rspack/core": "0.7.5",
21
+ "@rspack/core": "1.0.0-beta.4",
21
22
  "@types/node": "20.14.9",
22
23
  "@types/webpack-hot-middleware": "2.25.9",
23
24
  "html-webpack-plugin": "5.6.0",
@@ -40,18 +41,19 @@
40
41
  "publishConfig": {
41
42
  "registry": "https://registry.npmjs.org"
42
43
  },
44
+ "scripts": {
45
+ "prepublishOnly": "pnpm build",
46
+ "build": "tsup && tsup --config tsup.ui.config.ts && cp src/server/rspackConfig/userImportsLoader.cjs dist/server",
47
+ "release": "release-it",
48
+ "prepare": "husky"
49
+ },
43
50
  "peerDependencies": {
44
- "@rspack/core": "^0.6.0",
45
- "react-cosmos": "^6.0.0",
46
- "react-cosmos-dom": "^6.0.0"
51
+ "@rspack/core": ">=1.0.0-beta.0",
52
+ "react-cosmos": ">=6.0.0"
47
53
  },
48
54
  "lint-staged": {
49
55
  "*.{ts,json,md}": [
50
56
  "prettier --write"
51
57
  ]
52
- },
53
- "scripts": {
54
- "build": "tsup && tsup --config tsup.ui.config.ts && cp src/server/rspackConfig/userImportsLoader.cjs dist/server",
55
- "release": "release-it"
56
58
  }
57
- }
59
+ }