-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug report] personal theme set 'layouts/Layout.vue' to main field can not load index.styl #2178
Comments
Sorry but I cannot reproduce this issue. Please provide a "minimal" reproduce repo |
@meteorlxy I temporarily created a minimal reconstruction project link . You can just git clone it , then run But In fact, normal performance is like picture2. After my screening the code, the only difference is the "main" field in package.json. I found only setting the "main" field "index.js" instead of "layouts/Layout.vue" (or other js file pathname) can make styles normally. But the official documentation said it could be "layouts/Layout.vue", I doubt that vuepress can not import |
Confirmed. That's an issue about resolving theme path. Well, I personally decline |
Figured out the reason. This issue was caused by #1564, which did not fix the corresponding issue correctly. |
Bug report
Steps to reproduce
you can see the package.json for my theme, if i just
yarn start
in local , maybe the package.json is not necessary. Thetheme/index.js
in my theme is almost empty. And only do that as shown above, my theme can only to load index.styl automatically.if i remove
theme/index.js
and set the "main" field to layouts/Layout.vue in package.json from the reference , after i runnpm publish
and install the latest theme, the style can not be load in the page.What is expected?
set the "main" field to layouts/Layout.vue in package.json from the reference and publish my theme, people who installed the latest theme can load style correctly
What is actually happening?
theme may lose some style , due to the index.styl could not load automatically
Other relevant information
npx vuepress info
in my VuePress project:Environment Info:
System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 10.15.2 - /usr/local/bin/node
Yarn: 1.22.0 - ~/.yarn/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Browsers:
Chrome: 80.0.3987.100
Firefox: 71.0
Safari: 13.0.4
npmPackages:
@vuepress/core: 1.3.0
@vuepress/theme-default: 1.3.0
vuepress: ^1.2.0 => 1.3.0
npmGlobalPackages:
vuepress: 1.2.0
The text was updated successfully, but these errors were encountered: