diff --git a/packages/hydrogen/CHANGELOG.md b/packages/hydrogen/CHANGELOG.md index ff1e017d18..a68bccfffa 100644 --- a/packages/hydrogen/CHANGELOG.md +++ b/packages/hydrogen/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## Unreleased + +- fix: remove sourcemap warnings ## 0.7.0 - 2021-11-22 diff --git a/packages/hydrogen/package.json b/packages/hydrogen/package.json index e80c7d9390..3677fba709 100644 --- a/packages/hydrogen/package.json +++ b/packages/hydrogen/package.json @@ -83,7 +83,7 @@ "vite": "^2.6.14" }, "dependencies": { - "@vitejs/plugin-react": "^1.0.8", + "@vitejs/plugin-react": "^1.1.0", "connect": "^3.7.0", "es-module-lexer": "^0.9.0", "fast-glob": "^3.2.5", diff --git a/packages/hydrogen/src/framework/plugins/vite-plugin-react-server-components-shim.ts b/packages/hydrogen/src/framework/plugins/vite-plugin-react-server-components-shim.ts index c2f83fb3ca..3473e5859c 100644 --- a/packages/hydrogen/src/framework/plugins/vite-plugin-react-server-components-shim.ts +++ b/packages/hydrogen/src/framework/plugins/vite-plugin-react-server-components-shim.ts @@ -3,7 +3,6 @@ import {normalizePath} from 'vite'; import path from 'path'; import {proxyClientComponent} from '../server-components'; import {resolve} from './resolver'; -import {promises as fs} from 'fs'; export default () => { let config: ResolvedConfig; @@ -61,18 +60,6 @@ export default () => { return proxyClientComponent({id}); } - // Temporary fix for sourcemap warnings in client components. This can be fixed in @vitejs/react-plugin. - // `react-ssr-prepass` sourcemap seems to be broken and crashes in workers/Jest. - if ( - id.endsWith('?no-proxy') || - id.includes('dist/react-ssr-prepass.es.js') - ) { - return { - code: await fs.readFile(id.split('?')[0], 'utf-8'), - map: {mappings: ''}, - }; - } - return null; }, diff --git a/yarn.lock b/yarn.lock index 7906368be3..e9439149df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,7 +28,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.0.tgz#ea269d7f78deb3a7826c39a4048eecda541ebdaa" integrity sha512-DGjt2QZse5SGd9nfOSqO4WLJ8NN/oHkijbXbPrxuoJO3oIPJL3TciZs9FX+cOHNiY9E9l0opL8g7BmLe3T+9ew== -"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.14.0", "@babel/core@^7.15.5", "@babel/core@^7.7.5": +"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.14.0", "@babel/core@^7.16.0", "@babel/core@^7.7.5": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4" integrity sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ== @@ -472,28 +472,28 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-react-jsx-development@^7.14.5": +"@babel/plugin-transform-react-jsx-development@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.0.tgz#1cb52874678d23ab11d0d16488d54730807303ef" integrity sha512-qq65iSqBRq0Hr3wq57YG2AmW0H6wgTnIzpffTphrUWUgLCOK+zf1f7G0vuOiXrp7dU1qq+fQBoqZ3wCDAkhFzw== dependencies: "@babel/plugin-transform-react-jsx" "^7.16.0" -"@babel/plugin-transform-react-jsx-self@^7.14.9": +"@babel/plugin-transform-react-jsx-self@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.16.0.tgz#09202158abbc716a08330f392bfb98d6b9acfa0c" integrity sha512-97yCFY+2GvniqOThOSjPor8xUoDiQ0STVWAQMl3pjhJoFVe5DuXDLZCRSZxu9clx+oRCbTiXGgKEG/Yoyo6Y+w== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-react-jsx-source@^7.14.5": +"@babel/plugin-transform-react-jsx-source@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.16.0.tgz#d40c959d7803aae38224594585748693e84c0a22" integrity sha512-8yvbGGrHOeb/oyPc9tzNoe9/lmIjz3HLa9Nc5dMGDyNpGjfFrk8D2KdEq9NRkftZzeoQEW6yPQ29TMZtrLiUUA== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-react-jsx@^7.0.0", "@babel/plugin-transform-react-jsx@^7.14.9", "@babel/plugin-transform-react-jsx@^7.16.0": +"@babel/plugin-transform-react-jsx@^7.0.0", "@babel/plugin-transform-react-jsx@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz#55b797d4960c3de04e07ad1c0476e2bc6a4889f1" integrity sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw== @@ -2918,18 +2918,18 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -"@vitejs/plugin-react@^1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-1.0.8.tgz#98163d107fbc02b2c22c299657d4911490bb8820" - integrity sha512-Rt0tClew2QQokF03MoiIXTMMTIVKTH0eYulN9i81v/LitH4MfDHzIgetPzKvp+uCO9Fyb3tfYNKCw6l2/zW00w== - dependencies: - "@babel/core" "^7.15.5" - "@babel/plugin-transform-react-jsx" "^7.14.9" - "@babel/plugin-transform-react-jsx-development" "^7.14.5" - "@babel/plugin-transform-react-jsx-self" "^7.14.9" - "@babel/plugin-transform-react-jsx-source" "^7.14.5" +"@vitejs/plugin-react@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-1.1.0.tgz#8dc889a3b37d475c4c5196bfa9dd6052182d6a1e" + integrity sha512-hRAqG6/lYf0mfDm/1r0U81vwPWMpyi87e4bFK+LvVQQeIgdh6TwvfuF20waenSGSumz6JH2bfk9DbxdgDLRp/w== + dependencies: + "@babel/core" "^7.16.0" + "@babel/plugin-transform-react-jsx" "^7.16.0" + "@babel/plugin-transform-react-jsx-development" "^7.16.0" + "@babel/plugin-transform-react-jsx-self" "^7.16.0" + "@babel/plugin-transform-react-jsx-source" "^7.16.0" "@rollup/pluginutils" "^4.1.1" - react-refresh "^0.10.0" + react-refresh "^0.11.0" resolve "^1.20.0" "@wessberg/stringutil@^1.0.19": @@ -11222,10 +11222,10 @@ react-reconciler@^0.26.2: object-assign "^4.1.1" scheduler "^0.20.2" -react-refresh@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.10.0.tgz#2f536c9660c0b9b1d500684d9e52a65e7404f7e3" - integrity sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ== +react-refresh@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" + integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A== react-router-dom@^5.2.0: version "5.3.0"