This commit is contained in:
konnorrogers
2024-06-28 17:02:56 -04:00
parent b37590a520
commit 259e2186dc

View File

@@ -67,20 +67,17 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: { esmExternals: "loose" },
experimental: { esmExternals: 'loose' },
webpack: (config, options) => {
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: resolve(
__dirname,
"node_modules/@shoelace-style/shoelace/dist/assets/"
),
to: resolve(__dirname, "public/shoelace-assets/assets/"),
},
],
})
new CopyPlugin({
patterns: [
{
from: resolve(__dirname, 'node_modules/@shoelace-style/shoelace/dist/assets/'),
to: resolve(__dirname, 'public/shoelace-assets/assets/')
}
]
})
);
return config;
}
@@ -99,8 +96,8 @@ Once we've got our webpack config / next config setup, lets modify our `app/layo
```javascript
// app/layout.tsx
import "./globals.css";
import "@shoelace-style/shoelace/dist/themes/light.css";
import './globals.css';
import '@shoelace-style/shoelace/dist/themes/light.css';
// We can also import the dark theme here as well.
// import "@shoelace-style/shoelace/dist/themes/dark.css";
```
@@ -300,7 +297,6 @@ function MyApp({ Component, pageProps, URL }) {
}
```
## Additional Resources
- There is a third-party [example repo](https://github.com/crutchcorn/nextjs-shoelace-example), courtesy of [crutchcorn](https://github.com/crutchcorn), available to help you get started using Pages Router.