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
constpkgPath=require.resolve(name)letpackageRootDir=parse(pkgPath).dir// For those cases that "main" field was set to non-index file// e.g. `layouts/Layout.vue`while(!fs.existsSync(`${packageRootDir}/package.json`)){packageRootDir=resolve(packageRootDir,'..')}
What is expected?
Allow "main" field to be set to something like lib/index.js (As explained in #1204 )
In such case, the packageRootDir should be <pkgDir>/lib/
What is actually happening?
The packageRootDir is <pkgDir> now.
The text was updated successfully, but these errors were encountered:
There is another more important case for now, a 0.x user would want to migrate his/her theme to 1.x and doesn't have themeEntry, so he need set the "main" field to layouts/Layout.vue. so we need to retrieve the correct theme path.
Bug report
Version
1.0.0-alpha.40
Steps to reproduce
d16d3d5#diff-56a897e96a354a8b8ea86dc24074ad5bR61
What is expected?
Allow "main" field to be set to something like
lib/index.js
(As explained in #1204 )In such case, the
packageRootDir
should be<pkgDir>/lib/
What is actually happening?
The
packageRootDir
is<pkgDir>
now.The text was updated successfully, but these errors were encountered: