Skip to content

Commit

Permalink
fixup! Feat: Example NextJS app with app router #DS-1393
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Aug 14, 2024
1 parent 2e5982f commit 4a154b1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
18 changes: 17 additions & 1 deletion examples/spirit-next-app-router/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
import path, { dirname } from 'path';
import { fileURLToPath } from 'url';

const pathDir = dirname(fileURLToPath(import.meta.url));

/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
transpilePackages: ['@lmc-eu/spirit-web-react'],
reactStrictMode: true,
sassOptions: {
fiber: false,
includePaths: [
path.join(pathDir, 'node_modules'),
path.join(pathDir, 'node_modules/@lmc-eu/spirit-design-tokens/scss'),
path.join(pathDir, 'src/styles'),
],
},
};

export default nextConfig;
5 changes: 4 additions & 1 deletion examples/spirit-next-app-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"lint": "next lint"
},
"dependencies": {
"next": "14.2.5",
"@lmc-eu/spirit-design-tokens": "2.0.3",
"@lmc-eu/spirit-web": "2.3.0",
"@lmc-eu/spirit-web-react": "^2.3.0",
"next": "14.2.3",
"react": "^18",
"react-dom": "^18"
},
Expand Down
1 change: 1 addition & 0 deletions examples/spirit-next-app-router/src/app/globals.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '@lmc-eu/spirit-web/scss';
10 changes: 4 additions & 6 deletions examples/spirit-next-app-router/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import React from 'react';
import { Heading, Divider } from '@lmc-eu/spirit-web-react/src';
import './globals.scss';

const Home = () => {
return (
<>
<Heading elementType="h2" size="large">
App-router-demo
</Heading>
<Divider />
</>
<Heading elementType="h2" size="large">
Spirit App Router
</Heading>
);
};

Expand Down

0 comments on commit 4a154b1

Please sign in to comment.