-
Notifications
You must be signed in to change notification settings - Fork 93
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
Migrate to vite / vitest / vitepress for building #3529
Conversation
https://app.netlify.com/sites/nextcloud-vue-components/deploys/63874efdd546a70009f9b500
|
Oh yes, I only tested the live preview. Looks like the build is broken because |
@skjnldsv fixed the issue. So now everything works, even styleguide build. |
The styleguide preview somehow doesn't work yet. |
Do you get any error message? As for me it works voko.mp4 |
I didnt' try the local build, I just checked the browser preview here https://deploy-preview-3529--nextcloud-vue-components.netlify.app/ |
I do not know how netlify is configured, where does it try to load the
|
I don
I don't know either. But the deploy log here https://app.netlify.com/sites/nextcloud-vue-components/deploys/638e134d9ffb950008585e30 says this: ...
4:51:40 PM: vitepress v1.0.0-alpha.29
4:51:40 PM: - building client + server bundles...
4:51:45 PM: ✓ building client + server bundles...
4:51:45 PM: build error:
4:51:45 PM: file:///opt/build/repo/styleguide/.vitepress/.temp/plugin-vue_export-helper.1460a1c7.js:1
4:51:45 PM: import { initDirectivesForSSR, ssrContextKey, warn as warn$1, Fragment, Static, Comment, Text, mergeProps, createVNode, ssrUtils, createApp } from "vue";
4:51:45 PM: ^^^^
4:51:45 PM: SyntaxError: The requested module 'vue' does not provide an export named 'Text'
4:51:45 PM: at ModuleJob._instantiate (internal/modules/esm/module_job.js:124:21)
4:51:45 PM: at async ModuleJob.run (internal/modules/esm/module_job.js:179:5)
4:51:45 PM: at async Loader.import (internal/modules/esm/loader.js:178:24)
4:51:45 PM: at async build (file:///opt/build/repo/styleguide/node_modules/vitepress/dist/node/serve-fcdc8868.js:42002:24)
4:51:45 PM:
4:51:45 PM: ────────────────────────────────────────────────────────────────
4:51:45 PM: "build.command" failed
4:51:45 PM: ────────────────────────────────────────────────────────────────
4:51:45 PM:
4:51:45 PM: Error message
4:51:45 PM: Creating deploy upload records
4:51:45 PM: Command failed with exit code 1: npm ci && npm run styleguide:build (https://ntl.fyi/exit-code-1)
4:51:45 PM:
4:51:45 PM: Error location
4:51:45 PM: In Build command from Netlify app:
4:51:45 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
4:51:45 PM: npm ci && npm run styleguide:build
4:51:45 PM:
4:51:45 PM: Resolved config
4:51:45 PM: build:
4:51:45 PM: command: npm ci && npm run styleguide:build
4:51:45 PM: commandOrigin: ui
4:51:45 PM: environment:
4:51:45 PM: - NODE_VERSION
4:51:45 PM: - NPM_VERSION
4:51:45 PM: - REVIEW_ID
4:51:45 PM: publish: /opt/build/repo/styleguide
4:51:45 PM: publishOrigin: ui
4:51:45 PM: Caching artifacts
... |
@raimund-schluessler "Fixed" that, it was indeed the netlify config which seems to be set up to take the whole |
Nice, I can see the styleguide now. But somehow the components have no live preview, as it is in the current docs. Can this be enabled? |
As stated above the problem is vitepress uses Vue 3, but we are still using Vue 2. I was able to fix this but that required Node import maps which are experimental, so I will have to look for an other solution until we can port all components to vue 3 :) |
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
This entry point provides all components, mixins etc as named exports. Added vue plugin export `NextcloudVue` so users can register all components using the vue plugin functionality: `Vue.use(NextcloudVue)` Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Vite4 was just released: https://vitejs.dev/blog/announcing-vite4.html |
I think I will close this PR as the migration does not make much sense while using vue 2. |
Created because of this comment: #2959 (comment)
Based on this comment I migrated the project to use vite for bundling / building (without noticing this is already done in #2959).
One problem with this migration is the missing live preview of the Nc components, as
vitepress
is using vue3 but we are still using vue2. This leads dependency issues.(I got it working locally but it requires experimental node features (import maps) to mount vue2 components within vitepress vue3).