Implement medicine library and cabinet

This commit is contained in:
Aerilyn Weber 2026-03-28 08:19:48 +09:00
parent db79af06f7
commit 1f66fab30f
72 changed files with 7642 additions and 319 deletions

View file

@ -1,7 +1,28 @@
import type { NextConfig } from 'next';
import path from 'path';
const sharedSrc = path.resolve(import.meta.dirname, '../shared/src');
const nextConfig: NextConfig = {
transpilePackages: ['@meshitrack/shared'],
turbopack: {},
webpack: (config) => {
// The shared package source uses ESM `.js` extensions on imports (e.g. `./enums/index.js`).
// When Next.js resolves via tsconfig paths to the raw `.ts` source, webpack needs to
// know that `.js` imports inside that directory should resolve to `.ts` files.
config.resolve = config.resolve ?? {};
config.resolve.extensionAlias = {
...config.resolve.extensionAlias,
'.js': ['.ts', '.js'],
};
// Ensure the shared source directory is included in the module resolution
config.resolve.alias = {
...config.resolve.alias,
'@meshitrack/shared': sharedSrc,
};
return config;
},
};
export default nextConfig;