問題タブ [yarn-workspaces]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
node.js - compile typescript to js with webpack and keep directory structure
I want webpack to compile my typescript node project into js but I want it to maintain the directory structure and not bundle into 1 file.
Is this possible?
My structure is:
And I want it to compile to:
currently my config is like this:
Is it possible with webpack?
I can't use just tsc
because I have a yarn workspaces monorepo and I might have a link reference like this:
import {something} from '@my/package';
@my/package
does not exist in npm and only exists in the context of the monorepo, I can use node externals with webpack to include it in the bundle I don't think I can keep the folder structure this way.
Would the new typescript 3.0 project references solve this problem?