Skip to content

Commit 946f49c

Browse files
authored
Fix/merge webpack (#160)
* bump dependencies * fix: handle plugins from user * refactor: merge multiple providers
1 parent 7f049c2 commit 946f49c

File tree

22 files changed

+3612
-1714
lines changed

22 files changed

+3612
-1714
lines changed

.changeset/dirty-beers-share.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-showroom': patch
3+
---
4+
5+
Bug fix: Fix broken build if any plugins is provided by user

.changeset/sour-crabs-refuse.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@showroomjs/core': minor
3+
'@showroomjs/device-frames': minor
4+
'@showroomjs/measure': minor
5+
'react-showroom': minor
6+
'@showroomjs/ui': minor
7+
---
8+
9+
Bump dependencies

docs/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"license": "MIT",
55
"version": "1.1.39",
66
"dependencies": {
7-
"@babel/runtime": "^7.18.6",
7+
"@babel/runtime": "^7.18.9",
88
"@heroicons/react": "^1.0.6",
99
"classnames": "^2.3.1",
1010
"esbuild-loader": "^2.19.0",
1111
"react": "^18.2.0",
1212
"react-dom": "^18.2.0",
13-
"react-hook-form": "^7.33.1",
13+
"react-hook-form": "^7.34.0",
1414
"react-showroom": "workspace:*"
1515
},
1616
"scripts": {
@@ -19,13 +19,13 @@
1919
},
2020
"devDependencies": {
2121
"@tailwindcss/forms": "^0.5.2",
22-
"autoprefixer": "^10.4.7",
22+
"autoprefixer": "^10.4.8",
2323
"css-loader": "^6.7.1",
2424
"css-minimizer-webpack-plugin": "^4.0.0",
2525
"mini-css-extract-plugin": "^2.6.1",
26-
"postcss": "^8.4.14",
27-
"postcss-loader": "^7.0.0",
26+
"postcss": "^8.4.16",
27+
"postcss-loader": "^7.0.1",
2828
"style-loader": "^3.3.1",
29-
"tailwindcss": "^3.1.4"
29+
"tailwindcss": "^3.1.8"
3030
}
3131
}

examples/client-only-example/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
"build-showroom": "react-showroom build"
99
},
1010
"dependencies": {
11-
"@babel/runtime": "^7.18.6",
11+
"@babel/runtime": "^7.18.9",
1212
"classnames": "^2.3.1",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0",
1515
"react-showroom": "workspace:*"
1616
},
1717
"devDependencies": {
18-
"autoprefixer": "^10.4.7",
19-
"postcss": "^8.4.14",
20-
"tailwindcss": "^3.1.4",
18+
"autoprefixer": "^10.4.8",
19+
"postcss": "^8.4.16",
20+
"tailwindcss": "^3.1.8",
2121
"typescript": "~4.6.4",
22-
"webpack": "^5.73.0"
22+
"webpack": "^5.74.0"
2323
}
2424
}

examples/cra-example/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@testing-library/jest-dom": "^5.16.4",
6+
"@testing-library/jest-dom": "^5.16.5",
77
"@testing-library/react": "^13.3.0",
8-
"@testing-library/user-event": "^14.2.1",
9-
"@types/jest": "^28.1.4",
8+
"@testing-library/user-event": "^14.4.2",
9+
"@types/jest": "^28.1.6",
1010
"@types/node": "^18.0.1",
11-
"@types/react": "^18.0.14",
12-
"@types/react-dom": "^18.0.5",
11+
"@types/react": "^18.0.16",
12+
"@types/react-dom": "^18.0.6",
1313
"classnames": "^2.3.1",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0",
@@ -46,7 +46,7 @@
4646
"devDependencies": {
4747
"@types/testing-library__jest-dom": "^5.14.5",
4848
"react-showroom": "workspace:*",
49-
"sass": "^1.53.0",
50-
"tailwindcss": "^3.1.4"
49+
"sass": "^1.54.3",
50+
"tailwindcss": "^3.1.8"
5151
}
5252
}

examples/react-example/package.json

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"test:e2e": "pnpm run test:playwright -c playwright.ssr.config.ts && pnpm run test:playwright -c playwright.spa.config.ts"
1616
},
1717
"dependencies": {
18-
"@babel/runtime": "^7.18.6",
18+
"@babel/runtime": "^7.18.9",
1919
"@heroicons/react": "^1.0.6",
2020
"@tailwindcss/forms": "^0.5.2",
2121
"classnames": "^2.3.1",
@@ -24,31 +24,33 @@
2424
"msw": "^0.42.1",
2525
"react": "^18.2.0",
2626
"react-dom": "^18.2.0",
27-
"react-hook-form": "^7.33.1",
27+
"react-hook-form": "^7.34.0",
2828
"react-query": "^3.39.1",
2929
"react-showroom": "workspace:*",
3030
"react-textarea-autosize": "^8.3.4"
3131
},
3232
"devDependencies": {
33-
"@babel/core": "^7.18.6",
34-
"@babel/plugin-transform-runtime": "^7.18.6",
35-
"@babel/preset-env": "^7.18.6",
33+
"@babel/core": "^7.18.10",
34+
"@babel/plugin-transform-runtime": "^7.18.10",
35+
"@babel/preset-env": "^7.18.10",
3636
"@babel/preset-react": "^7.18.6",
3737
"@babel/preset-typescript": "^7.18.6",
38-
"@testing-library/dom": "^8.14.0",
38+
"@testing-library/dom": "^8.16.1",
3939
"@testing-library/react": "^13.3.0",
40-
"@testing-library/user-event": "^14.2.1",
41-
"@types/jest": "^28.1.4",
42-
"autoprefixer": "^10.4.7",
40+
"@testing-library/user-event": "^14.4.2",
41+
"@types/jest": "^28.1.6",
42+
"@vanilla-extract/css": "^1.7.2",
43+
"@vanilla-extract/webpack-plugin": "^2.1.11",
44+
"autoprefixer": "^10.4.8",
4345
"babel-loader": "^8.2.5",
4446
"css-loader": "^6.7.1",
45-
"jest": "^28.1.2",
46-
"postcss": "^8.4.14",
47-
"postcss-loader": "^7.0.0",
47+
"jest": "^28.1.3",
48+
"postcss": "^8.4.16",
49+
"postcss-loader": "^7.0.1",
4850
"style-loader": "^3.3.1",
49-
"tailwindcss": "^3.1.4",
51+
"tailwindcss": "^3.1.8",
5052
"typescript": "~4.6.4",
51-
"webpack": "^5.73.0"
53+
"webpack": "^5.74.0"
5254
},
5355
"msw": {
5456
"workerDirectory": "public"

examples/react-example/react-showroom.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @ts-check
22
const path = require('path');
33
const { defineConfig } = require('react-showroom');
4+
const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin');
45

5-
module.exports = defineConfig((command) => ({
6+
module.exports = defineConfig(() => ({
67
require: ['tailwindcss/tailwind.css', './src/custom.css'],
78
items: [
89
{
@@ -75,4 +76,7 @@ module.exports = defineConfig((command) => ({
7576
},
7677
assetDir: 'public',
7778
wrapper: 'docs/provider.tsx',
79+
webpackConfig: {
80+
plugins: [new VanillaExtractPlugin()],
81+
},
7882
}));
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { style } from '@vanilla-extract/css';
2+
3+
export const baseStyle = style({
4+
borderRadius: '6px',
5+
borderColor: '#d1d5db',
6+
});

examples/react-example/src/components/form-control/text-input.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import cx from 'classnames';
22
import * as React from 'react';
33
import { callAll } from '../../lib/call-all';
4+
import { baseStyle } from './text-input.css';
45

56
export interface TextInputProps
67
extends React.ComponentPropsWithoutRef<'input'> {
@@ -21,7 +22,7 @@ export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
2122
<input
2223
type="text"
2324
className={cx(
24-
'rounded-md border-gray-300',
25+
baseStyle,
2526
inputProps.disabled && 'bg-gray-200',
2627
className
2728
)}

examples/subpath-example/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
"test:e2e": "playwright test"
1717
},
1818
"dependencies": {
19-
"@babel/runtime": "^7.18.6",
19+
"@babel/runtime": "^7.18.9",
2020
"@tailwindcss/forms": "^0.5.2",
2121
"classnames": "^2.3.1",
2222
"react": "^18.2.0",
2323
"react-dom": "^18.2.0",
2424
"react-showroom": "workspace:*"
2525
},
2626
"devDependencies": {
27-
"autoprefixer": "^10.4.7",
27+
"autoprefixer": "^10.4.8",
2828
"msw": "^0.42.1",
29-
"postcss": "^8.4.14",
30-
"postcss-loader": "^7.0.0",
31-
"tailwindcss": "^3.1.4",
32-
"tsup": "6.1.3",
29+
"postcss": "^8.4.16",
30+
"postcss-loader": "^7.0.1",
31+
"tailwindcss": "^3.1.8",
32+
"tsup": "6.2.1",
3333
"typescript": "~4.6.4"
3434
},
3535
"msw": {

0 commit comments

Comments
 (0)