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
15
0
Share
Node.js Subpath imports
nikawa2161
February 24, 2026
More Decks by nikawa2161
See All by nikawa2161
Sagaパターン入門(続編)
nikawa2161
0
28
Sagaパターン入門
nikawa2161
0
35
沖縄観光とPostgreSQL排他制約の話
nikawa2161
0
33
20251209_プログラミング原則の学び
nikawa2161
0
22
自分のコードを数年ぶりに読んだら
nikawa2161
0
16
ユーザーインタビュー分析に参加して得られたことと気づき
nikawa2161
0
22
oEmbedとは?
nikawa2161
0
73
はじめまして、にかわです
nikawa2161
0
18
課題を映す問題空間と、答えを描く解決空間
nikawa2161
0
14
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
It's Worth the Effort
3n
188
29k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
540
Evolving SEO for Evolving Search Engines
ryanjones
0
210
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
540
WENDY [Excerpt]
tessaabrams
11
37k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
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