Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Node.js Subpath imports
Search
nikawa2161
February 24, 2026
21
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Node.js Subpath imports
nikawa2161
February 24, 2026
More Decks by nikawa2161
See All by nikawa2161
Sagaパターン入門(続編)
nikawa2161
0
30
Sagaパターン入門
nikawa2161
0
40
沖縄観光とPostgreSQL排他制約の話
nikawa2161
0
35
20251209_プログラミング原則の学び
nikawa2161
0
25
自分のコードを数年ぶりに読んだら
nikawa2161
0
19
ユーザーインタビュー分析に参加して得られたことと気づき
nikawa2161
0
24
oEmbedとは?
nikawa2161
0
93
はじめまして、にかわです
nikawa2161
0
20
課題を映す問題空間と、答えを描く解決空間
nikawa2161
0
16
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
3.5k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
It's Worth the Effort
3n
188
29k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Amusing Abliteration
ianozsvald
1
200
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
590
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Transcript
None
core-api @/
None
core-api import { getCompanyById } from "../../../../../actions/companies/getCompanyById"; @/
dist/ dist src core-api
compilerOptions.paths core-api/tsconfig.json paths
None
@/ // Before import { getCompanyById } from "../../../../../actions/companies/getCompanyById"; //
After import { getCompanyById } from "@/actions/companies/getCompanyById";
tsconfig.json @/* Module not found: Can't resolve '@/actions/companies/...'
None
None
package.json imports tsconfig.json paths # { "imports": { "#*": "./src/*"
} }
None
None
// Before: 深い相対パス import { getCompanyById } from "../../../../../actions/companies/getCompanyById"; //
After: # サブパスインポート import { getCompanyById } from "#actions/companies/getCompanyById/index.ts";
None
# Using 'imports' subpath '#*' with target './src/...'. Module name
'#actions/companies/getCompanyById/index.ts' was successfully resolved to '.../apps/core-api/src/...'
None
compilerOptions.paths @/ package.json imports #* ./src/*
None