Install vue-sweetalert-icon globally

Updating the package to `v4.0.0` still gives me this warning:
```
 WARN  Compiled with 1 warnings
 WARN  in ./components/PasswordReset/ChangePassword.vue?vue&type=script&lang=js&
"export 'SweetalertIcon' was not found in 'vue-sweetalert-icons'
```

According to this thread https://github.com/JorgenVatle/vue-sweetalert-icons/issues/3
I copy+pasted the example configuration:
https://github.com/JorgenVatle/vue-sweetalert-icons-preview/blob/master/nuxt.config.js
https://github.com/JorgenVatle/vue-sweetalert-icons-preview/blob/master/plugins/vue-sweetalert-icons.js

And now the compile warnings are gone. I'm going to ask the maintainer if the
local import is not possible with `v4.0.0` anymore.
This commit is contained in:
Robert Schäfer 2019-08-06 10:55:20 +02:00
parent b43f1cdc92
commit 27163b8d79
10 changed files with 15 additions and 28 deletions

View File

@ -28,13 +28,8 @@
</template>
<script>
import { SweetalertIcon } from 'vue-sweetalert-icons'
export default {
name: 'ConfirmModal',
components: {
SweetalertIcon,
},
props: {
name: { type: String, default: '' },
type: { type: String, required: true },

View File

@ -27,13 +27,9 @@
<script>
import gql from 'graphql-tag'
import { SweetalertIcon } from 'vue-sweetalert-icons'
export default {
name: 'ReportModal',
components: {
SweetalertIcon,
},
props: {
name: { type: String, default: '' },
type: { type: String, required: true },

View File

@ -54,12 +54,10 @@
<script>
import PasswordStrength from '../Password/Strength'
import gql from 'graphql-tag'
import { SweetalertIcon } from 'vue-sweetalert-icons'
import PasswordForm from '~/components/utils/PasswordFormHelper'
export default {
components: {
SweetalertIcon,
PasswordStrength,
},
props: {

View File

@ -48,12 +48,8 @@
<script>
import gql from 'graphql-tag'
import { SweetalertIcon } from 'vue-sweetalert-icons'
export default {
components: {
SweetalertIcon,
},
data() {
return {
formData: {

View File

@ -71,7 +71,6 @@
<script>
import gql from 'graphql-tag'
import PasswordStrength from '../Password/Strength'
import { SweetalertIcon } from 'vue-sweetalert-icons'
import PasswordForm from '~/components/utils/PasswordFormHelper'
export const SignupVerificationMutation = gql`
@ -86,7 +85,6 @@ export const SignupVerificationMutation = gql`
export default {
components: {
PasswordStrength,
SweetalertIcon,
},
data() {
const passwordForm = PasswordForm({ translate: this.$t })

View File

@ -56,7 +56,6 @@
<script>
import gql from 'graphql-tag'
import { SweetalertIcon } from 'vue-sweetalert-icons'
export const SignupMutation = gql`
mutation($email: String!) {
@ -73,9 +72,6 @@ export const SignupByInvitationMutation = gql`
}
`
export default {
components: {
SweetalertIcon,
},
props: {
token: { type: String, default: null },
},

View File

@ -100,6 +100,7 @@ module.exports = {
{ src: '~/plugins/v-tooltip.js', ssr: false },
{ src: '~/plugins/izi-toast.js', ssr: false },
{ src: '~/plugins/vue-filters.js' },
{ src: '~/plugins/vue-sweetalert-icons.js' },
],
router: {

View File

@ -77,7 +77,7 @@
"vue-count-to": "~1.0.13",
"vue-izitoast": "1.1.2",
"vuex-i18n": "~1.13.1",
"vue-sweetalert-icons": "~3.2.1",
"vue-sweetalert-icons": "~4.0.0",
"zxcvbn": "^4.4.2"
},
"devDependencies": {

View File

@ -0,0 +1,4 @@
import Vue from 'vue'
import VueSweetalertIcons from 'vue-sweetalert-icons'
Vue.use(VueSweetalertIcons)

View File

@ -10345,7 +10345,7 @@ node-releases@^1.1.19:
dependencies:
semver "^5.3.0"
node-sass@~4.12.0:
node-sass@^4.12.0, node-sass@~4.12.0:
version "4.12.0"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017"
integrity sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==
@ -13129,7 +13129,7 @@ sass-graph@^2.2.4:
scss-tokenizer "^0.2.3"
yargs "^7.0.0"
sass-loader@~7.1.0:
sass-loader@^7.1.0, sass-loader@~7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-7.1.0.tgz#16fd5138cb8b424bf8a759528a1972d72aad069d"
integrity sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==
@ -15053,10 +15053,13 @@ vue-svg-loader@~0.12.0:
loader-utils "^1.2.3"
svg-to-vue "^0.4.0"
vue-sweetalert-icons@~3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/vue-sweetalert-icons/-/vue-sweetalert-icons-3.2.1.tgz#d37b3ee91504e2f5e5a00941f43a0faacd409dfe"
integrity sha512-Exu2+ob+0BhMyo8kkHyEOcG/IDZGSPHxpbt8ZDSUwxPE9Fk/qt6JKiH/Q338giZGHCM9yfFym8yrWiRfPNbM+g==
vue-sweetalert-icons@~4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/vue-sweetalert-icons/-/vue-sweetalert-icons-4.0.0.tgz#49dfda05b7f8539288734d7a110d9a6ab53fd324"
integrity sha512-C1VJpLpUSBn387VNcaBAPfsqnHdRSvJmCascLFWHrs0AXtOKEbG+XiRIHnR/K7IR3SinASPM/uBmSHFsES/PEw==
dependencies:
node-sass "^4.12.0"
sass-loader "^7.1.0"
vue-template-compiler@^2.6.10:
version "2.6.10"