Open tbyte80 opened 3 years ago
On this page: https://day.js.org/docs/en/plugin/plugin a template is provided how to create a custom plugin.
However, if I create a simple test plugin:
export default (option, dayjsClass, dayjsFactory) => { dayjsClass.prototype.foo= function() { return 'foo'; } }
and import it using:
var foo= require('my-dayjs-plugins/foo/index') dayjs.extend(foo) // use plugin
I get the error: Uncaught TypeError: t is not a function
Uncaught TypeError: t is not a function
What am I doing wrong?
a reproduction demo, pls
On this page: https://day.js.org/docs/en/plugin/plugin a template is provided how to create a custom plugin.
However, if I create a simple test plugin:
and import it using:
I get the error:
Uncaught TypeError: t is not a function
What am I doing wrong?