Skip to content

Commit

Permalink
Merge pull request #2664 from remotion-dev/dev-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger authored Aug 2, 2023
2 parents 1d2bd20 + e30406e commit 0df637f
Show file tree
Hide file tree
Showing 6 changed files with 353 additions and 565 deletions.
1 change: 1 addition & 0 deletions packages/bundler/src/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const webpackConfig = ({
alias: {
// Only one version of react
'react/jsx-runtime': require.resolve('react/jsx-runtime'),
'react/jsx-dev-runtime': require.resolve('react/jsx-dev-runtime'),
react: require.resolve('react'),
'react-dom/client': shouldUseReactDomClient
? require.resolve('react-dom/client')
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/docs/legacy-babel-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ values={[
<TabItem value="npm">

```bash
npm i mdx-loader babel-loader @babel/preset-env @babel/preset-react
npm i babel-loader @babel/preset-env @babel/preset-react
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm i mdx-loader babel-loader @babel/preset-env @babel/preset-react
pnpm i babel-loader @babel/preset-env @babel/preset-react
```

</TabItem>

<TabItem value="yarn">

```bash
yarn add mdx-loader babel-loader @babel/preset-env @babel/preset-react
yarn add babel-loader @babel/preset-env @babel/preset-react
```

</TabItem>
Expand Down
21 changes: 5 additions & 16 deletions packages/docs/docs/overwriting-webpack-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,22 @@ values={[
<TabItem value="npm">

```bash
npm i mdx-loader babel-loader @babel/preset-env @babel/preset-react
npm i @mdx-js/loader @mdx-js/react
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm i mdx-loader babel-loader @babel/preset-env @babel/preset-react
pnpm i @mdx-js/loader @mdx-js/react
```

</TabItem>

<TabItem value="yarn">

```bash
yarn add mdx-loader babel-loader @babel/preset-env @babel/preset-react
yarn add @mdx-js/loader @mdx-js/react
```

</TabItem>
Expand All @@ -161,20 +161,9 @@ export const enableMdx: WebpackOverrideFn = (currentConfiguration) => {
test: /\.mdx?$/,
use: [
{
loader: "babel-loader",
options: {
presets: [
"@babel/preset-env",
[
"@babel/preset-react",
{
runtime: "automatic",
},
],
],
},
loader: "@mdx-js/loader",
options: {},
},
"mdx-loader",
],
},
],
Expand Down
7 changes: 2 additions & 5 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
"render-transparent": "remotion render --image-format=png --pixel-format=yuva420p --codec=vp8 react-svg out/video.webm"
},
"dependencies": {
"@babel/plugin-syntax-jsx": "7.12.13",
"@babel/preset-env": "7.12.13",
"@babel/preset-react": "7.12.13",
"@mdx-js/react": "^1.6.21",
"@mdx-js/react": "^2.3.0",
"@mdx-js/loader": "^2.3.0",
"@react-three/drei": "9.79.4",
"@react-three/fiber": "8.13.5",
"@remotion/babel-loader": "workspace:*",
Expand Down Expand Up @@ -56,7 +54,6 @@
"@types/web": "0.0.78",
"babel-loader": "^8.2.2",
"lottie-web": "5.12.2",
"mdx-loader": "3.0.2",
"opentype.js": "^1.3.4",
"polished": "^4.0.5",
"prettier": "^2.7.1",
Expand Down
15 changes: 2 additions & 13 deletions packages/example/src/webpack-override.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,9 @@ export const webpackOverride: WebpackOverrideFn = (currentConfiguration) => {
test: /\.mdx?$/,
use: [
{
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-env',
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
],
},
loader: '@mdx-js/loader',
options: {},
},
'mdx-loader',
],
},
],
Expand Down
Loading

1 comment on commit 0df637f

@vercel
Copy link

@vercel vercel bot commented on 0df637f Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.