diff --git a/apps/storybook-react/.storybook/main.ts b/apps/storybook-react/.storybook/main.ts index 6af9f2e..469e2be 100644 --- a/apps/storybook-react/.storybook/main.ts +++ b/apps/storybook-react/.storybook/main.ts @@ -38,10 +38,6 @@ const config: StorybookConfig = { __dirname, '../../../node_modules/@metamask/design-tokens', ), - '@components': path.resolve( - __dirname, - '../packages/react-components/src', - ), }; } return config; diff --git a/apps/storybook-react/package.json b/apps/storybook-react/package.json index 3672e8a..a750ee0 100644 --- a/apps/storybook-react/package.json +++ b/apps/storybook-react/package.json @@ -24,6 +24,7 @@ "@types/prop-types": "^15", "@types/react": "^18.2.0", "@types/react-dom": "^18.2.0", + "@vitejs/plugin-react": "^4.3.3", "autoprefixer": "^10.4.20", "prop-types": "^15.8.1", "react": "^18.2.0", diff --git a/apps/storybook-react/vite.config.ts b/apps/storybook-react/vite.config.ts index 0a375b9..fabde1a 100644 --- a/apps/storybook-react/vite.config.ts +++ b/apps/storybook-react/vite.config.ts @@ -1,14 +1,6 @@ -// import path from 'path'; +import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; export default defineConfig({ - resolve: { - // TO DO: Update when react component package is created - // alias: { - // '@components': path.resolve( - // __dirname, - // '../packages/react-components/src', - // ), - // }, - }, + plugins: [react()], }); diff --git a/yarn.lock b/yarn.lock index 5629506..14fa97d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -77,7 +77,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.0, @babel/core@npm:^7.23.5, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.18.9, @babel/core@npm:^7.20.0, @babel/core@npm:^7.23.5, @babel/core@npm:^7.25.2, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": version: 7.26.0 resolution: "@babel/core@npm:7.26.0" dependencies: @@ -1358,7 +1358,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-self@npm:^7.0.0": +"@babel/plugin-transform-react-jsx-self@npm:^7.0.0, @babel/plugin-transform-react-jsx-self@npm:^7.24.7": version: 7.25.9 resolution: "@babel/plugin-transform-react-jsx-self@npm:7.25.9" dependencies: @@ -1369,7 +1369,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-source@npm:^7.0.0": +"@babel/plugin-transform-react-jsx-source@npm:^7.0.0, @babel/plugin-transform-react-jsx-source@npm:^7.24.7": version: 7.25.9 resolution: "@babel/plugin-transform-react-jsx-source@npm:7.25.9" dependencies: @@ -3422,6 +3422,7 @@ __metadata: "@types/prop-types": "npm:^15" "@types/react": "npm:^18.2.0" "@types/react-dom": "npm:^18.2.0" + "@vitejs/plugin-react": "npm:^4.3.3" autoprefixer: "npm:^10.4.20" prop-types: "npm:^15.8.1" react: "npm:^18.2.0" @@ -5273,7 +5274,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.18.0": +"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.18.0, @types/babel__core@npm:^7.20.5": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" dependencies: @@ -5780,6 +5781,21 @@ __metadata: languageName: node linkType: hard +"@vitejs/plugin-react@npm:^4.3.3": + version: 4.3.3 + resolution: "@vitejs/plugin-react@npm:4.3.3" + dependencies: + "@babel/core": "npm:^7.25.2" + "@babel/plugin-transform-react-jsx-self": "npm:^7.24.7" + "@babel/plugin-transform-react-jsx-source": "npm:^7.24.7" + "@types/babel__core": "npm:^7.20.5" + react-refresh: "npm:^0.14.2" + peerDependencies: + vite: ^4.2.0 || ^5.0.0 + checksum: 10/816b47c54aefce198ce2fb2b3e63b5f158ab33b04713dbec0e780a89c5126d4ea6b08544972464c43096b16e90e7f467fcf19692fad30d4f8ca5bf9a386f38b3 + languageName: node + linkType: hard + "@vitest/expect@npm:2.0.5": version: 2.0.5 resolution: "@vitest/expect@npm:2.0.5" @@ -16919,6 +16935,13 @@ __metadata: languageName: node linkType: hard +"react-refresh@npm:^0.14.2": + version: 0.14.2 + resolution: "react-refresh@npm:0.14.2" + checksum: 10/512abf97271ab8623486061be04b608c39d932e3709f9af1720b41573415fa4993d0009fa5138b6705b60a98f4102f744d4e26c952b14f41a0e455521c6be4cc + languageName: node + linkType: hard + "react-refresh@npm:^0.4.0": version: 0.4.3 resolution: "react-refresh@npm:0.4.3"