From 8c2edb4746342a5e0a48058c5b08bff489bf171a Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sun, 3 Mar 2024 07:25:30 +0100 Subject: [PATCH] Update with-react-bootstrap to be Turbopack compatible (#62773) ## What? This example used the legacy `~` operator which is no longer required in latest webpack. In case you land here trying Turbopack and running into the can't resolve error this will be useful to know: If you still need `~` it can be aliased using the `resolveAlias` option in Turbopack: ``` module.exports = { experimental: { turbo: { resolveAlias: { '~*': '*', }, }, }, } ``` Closes NEXT-2673 --- examples/with-react-bootstrap/pages/_app.jsx | 1 + examples/with-react-bootstrap/style/index.css | 3 --- examples/with-reactstrap/pages/_app.jsx | 2 ++ examples/with-reactstrap/styles/index.css | 3 --- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/with-react-bootstrap/pages/_app.jsx b/examples/with-react-bootstrap/pages/_app.jsx index 04dfe615ce..65fd30540b 100644 --- a/examples/with-react-bootstrap/pages/_app.jsx +++ b/examples/with-react-bootstrap/pages/_app.jsx @@ -1,3 +1,4 @@ +import "bootstrap/dist/css/bootstrap.min.css"; import "../style/index.css"; export default function MyApp({ Component, pageProps }) { diff --git a/examples/with-react-bootstrap/style/index.css b/examples/with-react-bootstrap/style/index.css index a445eaca17..95dc9c861b 100644 --- a/examples/with-react-bootstrap/style/index.css +++ b/examples/with-react-bootstrap/style/index.css @@ -1,6 +1,3 @@ -/* ensure all pages have Bootstrap CSS */ -@import "~bootstrap/dist/css/bootstrap.min.css"; - .md-container { max-width: 800px; padding-top: 2rem; diff --git a/examples/with-reactstrap/pages/_app.jsx b/examples/with-reactstrap/pages/_app.jsx index 54750cbd0f..96bbda0551 100644 --- a/examples/with-reactstrap/pages/_app.jsx +++ b/examples/with-reactstrap/pages/_app.jsx @@ -1,3 +1,5 @@ +import "bootstrap/dist/css/bootstrap.min.css"; + import "../styles/index.css"; export default function MyApp({ Component, pageProps }) { diff --git a/examples/with-reactstrap/styles/index.css b/examples/with-reactstrap/styles/index.css index a445eaca17..95dc9c861b 100644 --- a/examples/with-reactstrap/styles/index.css +++ b/examples/with-reactstrap/styles/index.css @@ -1,6 +1,3 @@ -/* ensure all pages have Bootstrap CSS */ -@import "~bootstrap/dist/css/bootstrap.min.css"; - .md-container { max-width: 800px; padding-top: 2rem;