Add webpack alias
This commit is contained in:
parent
98d228da4c
commit
da8ac77ace
@ -1,5 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import sweetalert2 from 'sweetalert2/dist/sweetalert2.min';
|
||||
import sweetalert2 from 'sweetalert2';
|
||||
import { trans } from './i18n';
|
||||
|
||||
/**
|
||||
@ -72,7 +72,6 @@ export function showModal(msg, title = 'Message', type = 'default', options = {}
|
||||
}).modal(options);
|
||||
}
|
||||
|
||||
/** @type {typeof import('sweetalert2').default} */
|
||||
export const swal = sweetalert2.mixin({
|
||||
confirmButtonText: trans('general.confirm'),
|
||||
cancelButtonText: trans('general.cancel')
|
||||
|
@ -141,12 +141,20 @@ const config = {
|
||||
output: {
|
||||
comments: /^\**!|@preserve|@license|@cc_on/
|
||||
}
|
||||
}
|
||||
},
|
||||
exclude: [
|
||||
/sweetalert2$/,
|
||||
/node_modules.*jquery$/
|
||||
]
|
||||
})
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json']
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
jquery: 'jquery/dist/jquery.min.js',
|
||||
sweetalert2$: 'sweetalert2/dist/sweetalert2.min.js',
|
||||
},
|
||||
},
|
||||
devtool: devMode ? 'cheap-module-eval-source-map' : false,
|
||||
stats: 'errors-only'
|
||||
|
Loading…
Reference in New Issue
Block a user