fix: drop turbopack, add webpack extensionAlias for SDK .js→.ts resolution
This commit is contained in:
@@ -3,6 +3,15 @@ import type { NextConfig } from 'next'
|
||||
const config: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
transpilePackages: ['@solana/connector', '@solisting/sdk', '@descro/sdk'],
|
||||
webpack(webpackConfig) {
|
||||
// Workspace SDK packages use .js extensions on TypeScript imports (ESM convention)
|
||||
// but have no compiled output — webpack must resolve .js → .ts
|
||||
webpackConfig.resolve.extensionAlias = {
|
||||
'.js': ['.ts', '.tsx', '.js'],
|
||||
'.mjs': ['.mts', '.mjs'],
|
||||
}
|
||||
return webpackConfig
|
||||
},
|
||||
}
|
||||
|
||||
export default config
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "solisting-app",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack",
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"typecheck": "tsc --noEmit"
|
||||
|
||||
Reference in New Issue
Block a user