-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Vue 3.x - export 'config' was not found in 'vue' #6756
Comments
Since Vue 3.x is currently in beta we do not officially support it in Amplify. I'll mark this as a feature request to investigate this so we can prepare for the Vue 3.x official launch. |
Hi @jordanranz , I am sure you are aware but Vue 3 was officially released last week. Thank you. We appreciate your work. |
If you're looking for a way to use the import { createApp } from 'vue';
import { applyPolyfills, defineCustomElements } from '@aws-amplify/ui-components/loader';
...
applyPolyfills().then(() => { defineCustomElements(window); });
...
const app = createApp(App);
app.config.isCustomElement = (tag) => tag.startsWith('amplify-'); |
@chrisleyva For context, it looks like StencilJS, which we use for our UI components, is still working on Vue 3 support. ionic-team/stencil-ds-output-targets#94 We will track this and update our library once the Stencil PR is released. |
@jordanranz Does amplify support Vue 3 yet? I'm getting this error and am unsure if I did something wrong or if it's still unsupported.
|
@krcummings1 As mentioned in the comment above, Amplify does not have Vue 3 support yet due to our usage of StencilJS for the UI Components. Once the pending PR is merged, we will work to upgrade our libraries soon after. |
Thanks for this @csbszb! This is the intended workaround while we work on vue3 support. Note that if you used |
As per official vue3 support, we are working on a plan that would support both Vue 1/2 and Vue 3. As you all have noted, Vue 3 deprecated global configuration // Vue 2
import Vue from 'vue'; // I'm a default export!
Vue.config.ignoredElements = [/^amplify-/];
// Vue 3
import { createApp } from 'vue'; // now I'm a named export?!
const app = createApp({});
app.config.isCustomElement = tag => tag.startsWith('amplify-'); The problem is that we cannot satisfy both versions because their configurations are almost mutually exclusive. Moreover, this approach doesn't work with Vue 3 if customer used So we are looking to use stencil output binding (based on the PR @amhinson mentioned) to generate vue components. But this would only support vue 3 again, so we are trying to devise a plan that would satisfy all vue versions and minimize configuration complexity on the user end. We will keep this issue open to track vue 3 support. Please feel to contribute or give suggestion as we work through this. Thanks! |
Hello! I wanted to provide an update here, we are currently planning work for support of Vue 3 into the UI Components. While we can't provide a timeline on when this will be released, this work has begun this sprint. |
This includes work arounds for a Vue 3 problem. See aws-amplify/amplify-js#6756
@csbszb
I wonder if the last line is important at all |
Hey @modullar, I think the problem is that with this line If you split them like this it works fine: const app = createApp(App);
app.config.isCustomElement = (tag) => tag.startsWith('amplify-');
app.mount('#app'); |
Closing as our docs have been updated for Vue 3: aws-amplify/docs#2880. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
When trying to import the Vue UI components with
import '@aws-amplify/ui-vue'
in a fresh Vue 3.x app, the console throws the error messageexport 'config' was not found in 'vue'
To Reproduce
Steps to reproduce the behavior:
vue create myamplifyproject
npm install aws-amplify @aws-amplify/ui-vue
src/main.js
npm run serve
Expected behavior
App to start without any errors
Additional context
I guess it has to do with how Vue 3.x exports it different methods
The text was updated successfully, but these errors were encountered: