-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(editor): add simple preview without frontend #4174
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for @serlo/frontendThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Believe it or not, this will break the build, or rather cause an error in the integrations that I haven't found a way to supress 😅 Maybe we can use two files vite build --config vite.config.lib.js
vite --config vite.config.dev.js Or modes / commands export default defineConfig(({ command, mode }) => {
if (command === 'build' && mode === 'lib') {
return {
....
}
} else {
return ...
}
}) Then pass the args in our package.json run scripts like this vite build --mode lib |
@CodingDive would that work? 9ef60b4 |
Works right now 🙌 Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so nice 😍 Thank you, it will be very helpful in the long run
Co-authored-by: Vitomir Budimir <budimirvitomir@gmail.com>
@elbotho It would be great to have a preview for the editor rendered within an iframe as well, as that's how it's rendered for some LTI integrations. Would you prefer if we add it to this PR, or open a follow-up PR once this is merged? |
Good idea, no preference :) I'm just waiting for a 👍 from @LarsTheGlidingSquirrel here before merging this to see if it works for him. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work great! I think it will be really valuable for us to have during development. Thank you so much! <3
work on the editor offline and without next running
run
yarn dev
in the editor and you can test both the web component and react (package) implementations as http://localhost:5173/@CodingDive how problematic is removing this line? With this set the dev server does not work somehow 🤷