Skip to content

Problem importing package starting at v1.2.25 #123

@jasonbarry

Description

@jasonbarry

Describe the bug
I'm getting a webpack error when I try to call Painterro():

TypeError: painterro__WEBPACK_IMPORTED_MODULE_1___default() is not a function. (In 
'painterro__WEBPACK_IMPORTED_MODULE_1___default()(configOptions)', 
'painterro__WEBPACK_IMPORTED_MODULE_1___default()' is an instance of Object)

Painterro version
v1.2.25

To Reproduce
Here's my source

import Painterro from 'painterro'

const configOptions = {
  activeColor: '#ff0000',
}

export default function Annotate() {
  const show = () => {
    Painterro(configOptions).show()
  }

  return (
    <button onClick={show}>Annotate</button>
  )
}

The error occurs when I click the button. With version v1.2.24, it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions