bili
bili copied to clipboard
Can I add footer?
Rollup provide both output.banner
and output.footer
(source)
But how can I add footer in bili?
What's the use case for footer
?
Maybe we can add a configureRollup
option so that you can mutate rollup config, like:
// bili.config.js
module.exports = {
configureRollup(config) {
config.output.footer = '// foo'
return config
}
}
I use this to develop userscript. But I need to do some workaround for vuedraggable, so I need to wrap the whole iife with a function.
some workaround for vuedraggable
Can you tell me more about this?
I need to wrap the whole iife with a function
Still not sure why you need this.
// @require https://unpkg.com/[email protected]/dist/vue.runtime.min.js
// @require https://unpkg.com/[email protected]/dist/vuex.min.js
// @require https://unpkg.com/[email protected]/Sortable.min.js
// @require https://cdn.jsdelivr.net/npm/vuedraggable/dist/vuedraggable.min.js
Vue.component('draggable') //=> undefined
I think it is because of
else if (window && window.Vue && window.Sortable) {
var draggable = buildDraggable(window.Sortable);
Vue.component('draggable', draggable);
}
So I need to use document.createElememt('script')
to make it load after vue & sortablejs loaded.
And execute iife after all things is loaded.
edit: I give up using vuedraggable, and try to use sortablejs directly