Skip to content

plugin-commonjs is useless for node_modules file #1431

Closed

Description

@jiayechao

i use @rollup/plugin-commonjs in vite

create a file named src/tool.js,
exports["default"] = 3

and import in App.vue

import a from './tool.js'
console.log(a) // {default: 3}

but same file in node_module is useless

import a from 'user.js' // tool.js in node_modules but wrong
// The requested module '/node_modules/user.js?v=313d6f97' does not provide an export named 'default'

image

Activity

  1. locked and limited conversation to collaborators on Feb 16, 2023
  2. converted this issue into a discussion #1432 on Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions