Skip to content

Commit 9e4236d

Browse files
committed
fix errors when building e2e for vue
1 parent 02f105d commit 9e4236d

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

examples/vue/src/main.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
import { createApp } from 'vue';
22
import App from './App.vue';
33
import router from './router';
4-
import AmplifyUIVue from '@aws-amplify/ui-vue';
4+
import * as AmplifyUIVue from '@aws-amplify/ui-vue';
55
import '@aws-amplify/ui-vue/styles.css';
66

77
// Create app and register plugins
88
const app = createApp(App);
99
app.use(router);
10-
app.use(AmplifyUIVue);
10+
11+
// Register individual components instead of using the plugin
12+
Object.entries(AmplifyUIVue).forEach(([name, component]) => {
13+
if (
14+
name !== 'default' &&
15+
typeof component === 'object' &&
16+
component !== null
17+
) {
18+
app.component(name, component);
19+
}
20+
});
21+
1122
app.mount('#app');

examples/vue/src/pages/ui/components/authenticator/sign-up-with-attributes/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Amplify.configure(aws_exports);
2121
placeholder="Zone Info"
2222
name="zoneinfo"
2323
:hideLabel="false"
24+
:required="true"
25+
type="text"
26+
:disabled="false"
2427
/>
2528
</template>
2629
<template v-slot="{ user, signOut }">

packages/vue/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
"scripts": {
3030
"prebuild": "rimraf dist",
3131
"build": "yarn build:CSS && yarn build:rollup",
32+
"postbuild": "rimraf global-spec.d.ts jest.config.d.ts jest.setup.d.ts",
3233
"build:CSS": "node --loader ts-node/esm scripts/copyCSS.ts",
33-
"build:rollup": "rollup --config --environment TS_EXCLUDE:global-spec.ts",
34+
"build:rollup": "rollup --config",
3435
"dev": "yarn build:rollup --watch",
3536
"clean": "rimraf dist node_modules",
3637
"check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-vue\"'",

0 commit comments

Comments
 (0)