Problem using shared files with commonjs modules

Hi,
I am working on an existing application that uses shared javascript files in Vue and in Node. These files use commonjs modules (module.exports). I started a new vue project using vue-ui and started migrating the existing components into this new project.
Now I’m getting the following warnings:

 warning  in ./src/components/component.vue?vue&type=script&lang=js&
"export 'default' (imported as 'Shared') was not found in '../sharedfile'

Inside the existing application everything works fine even though the shared files are imported using the same import syntax.

Does anyone have a solution for this?

Thanks in advance.

Looks like I could fix it by passing the following to @vue/cli-plugin-babel/preset inside babel.config.js:

instead of

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset',
  ],

I used

module.exports = {
  presets: [
    ['@vue/cli-plugin-babel/preset',
      {
        'modules': 'commonjs'
      }
    ]
  ],