You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
packup (looks for an index.js in the current directory, uses that as entry file)
packup somedir (looks for an index.js in the somedir, uses that as entry file)
packup somedir/somefile.js (uses this file as entry file)
The directory of the entry file is also set as webpack resolve.root and contentBase.
Additionally, it looks for a package.json and an index.html in the directory of the entry file and uses those if available. Otherwise it supplies dummy package info (only used for populating the index.html template) and uses its own index.html template file.
The problem is, that in our current setup package.json and index.html most often are not located in the same directory as the entry file. The actual code is in another directory, most often src. So we would either need another way to resolve the locations of necessary files outside this directory (e.g. using node-resolve) or allow other configuration options for packup. I prefer the former, although we may restrict lookup to only one level above the root directory.
Edit: Not sure if node-resolve would work as I expected
Currently packup can be run in one of three ways:
packup(looks for anindex.jsin the current directory, uses that as entry file)packup somedir(looks for anindex.jsin thesomedir, uses that as entry file)packup somedir/somefile.js(uses this file as entry file)The directory of the entry file is also set as webpack
resolve.rootandcontentBase.Additionally, it looks for a
package.jsonand anindex.htmlin the directory of the entry file and uses those if available. Otherwise it supplies dummy package info (only used for populating the index.html template) and uses its own index.html template file.The problem is, that in our current setup
package.jsonandindex.htmlmost often are not located in the same directory as the entry file. The actual code is in another directory, most oftensrc. So we would either need another way to resolve the locations of necessary files outside this directory (e.g. using node-resolve) or allow other configuration options for packup. I prefer the former, although we may restrict lookup to only one level above the root directory.Edit: Not sure if node-resolve would work as I expected