|
@@ -23,7 +23,7 @@ const examplePlugin = () => {
|
|
|
|
|
|
return {
|
|
return {
|
|
name: 'custom-vuedraggableAndSortable',
|
|
name: 'custom-vuedraggableAndSortable',
|
|
- transform(code, id) {
|
|
|
|
|
|
+ transform (code, id) {
|
|
/*eslint-disable*/
|
|
/*eslint-disable*/
|
|
if (isProduction) {
|
|
if (isProduction) {
|
|
if (/vuedraggable\.js/.test(id)) {
|
|
if (/vuedraggable\.js/.test(id)) {
|
|
@@ -33,7 +33,7 @@ const examplePlugin = () => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
if (/sortablejs/.test(id)) {
|
|
if (/sortablejs/.test(id)) {
|
|
- return code.replace(`plugins.forEach(function (p) {
|
|
|
|
|
|
+ return code.replace(` plugins.forEach(function (p) {
|
|
if (p.pluginName === plugin.pluginName) {
|
|
if (p.pluginName === plugin.pluginName) {
|
|
throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
|
|
throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
|
|
}
|
|
}
|
|
@@ -116,6 +116,7 @@ export default defineConfig(({ mode /*command,*/ }: ConfigEnv): UserConfig => {
|
|
proxy: {}
|
|
proxy: {}
|
|
},
|
|
},
|
|
plugins: [
|
|
plugins: [
|
|
|
|
+ examplePlugin(),
|
|
// vue支持
|
|
// vue支持
|
|
vue(),
|
|
vue(),
|
|
// JSX支持
|
|
// JSX支持
|
|
@@ -140,8 +141,7 @@ export default defineConfig(({ mode /*command,*/ }: ConfigEnv): UserConfig => {
|
|
// 指定symbolId格式
|
|
// 指定symbolId格式
|
|
symbolId: 'icon-[dir]-[name]'
|
|
symbolId: 'icon-[dir]-[name]'
|
|
}),
|
|
}),
|
|
- svgLoader(),
|
|
|
|
- examplePlugin()
|
|
|
|
|
|
+ svgLoader()
|
|
]
|
|
]
|
|
}
|
|
}
|
|
})
|
|
})
|