The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
dir entry in package.json required
Most of the time we develop an library (for example libx) in
libx/src directory, and publish it with
libx/dist after building it.
We may use it in another project with
require('libx/dist/utils.js') which looks ugly.
I wonder below:
- we could provide a new package.json config maybe called
mainDir, and then
require('libx/utils.js')will be automatic tranlated to
- we also could provide some items below publish config to control
mainDirto be automatic switched between develop and publish.
This would be wonderful!