Skip to content
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

fix(nuxt): add additional sections of nuxt vite config #109

Merged
merged 1 commit into from
Jun 4, 2022

Conversation

danielroe
Copy link
Collaborator

@danielroe danielroe commented Jun 4, 2022

Description

This adds a couple of extra sections of the Nuxt vite config, particularly the define section which will replace process.dev, process.server, process.client, etc., which are frequently used in Nuxt projects.

Additional context

This partially addresses #107, but we now still have a missing RouterLink that either needs to be stubbed or imported:

The following is the minimal RouterLink implemented by Nuxt when vue-router is not present:

const RouterLink = {
  functional: true,
  props: { to: String },
  setup: (props, { slots }) => () => h('a', { href: props.to, onClick: (e) => { e.preventDefault(); router.push(props.to) } }, slots)
}

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

resolves Nuxt3: Component with `<NuxtLink>`  throws `process is not defined` #107
@danielroe danielroe self-assigned this Jun 4, 2022
@netlify
Copy link

netlify bot commented Jun 4, 2022

Deploy Preview for histoire-site ready!

Name Link
🔨 Latest commit f338d9a
🔍 Latest deploy log https://app.netlify.com/sites/histoire-site/deploys/629b1feee474790008655a67
😎 Deploy Preview https://deploy-preview-109--histoire-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jun 4, 2022

Deploy Preview for histoire-examples-vue3 ready!

Name Link
🔨 Latest commit f338d9a
🔍 Latest deploy log https://app.netlify.com/sites/histoire-examples-vue3/deploys/629b1fee6078880008b47b80
😎 Deploy Preview https://deploy-preview-109--histoire-examples-vue3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jun 4, 2022

Deploy Preview for histoire-controls ready!

Name Link
🔨 Latest commit f338d9a
🔍 Latest deploy log https://app.netlify.com/sites/histoire-controls/deploys/629b1fee93aec70009ec898e
😎 Deploy Preview https://deploy-preview-109--histoire-controls.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Akryum Akryum merged commit e31f543 into main Jun 4, 2022
@Akryum Akryum deleted the fix/extra-nuxt-vite-options branch June 4, 2022 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants