Skip to content

vite-plugin-content internal import error #204

@vhexl

Description

@vhexl

Versions

  • originjs: @originjs/vite-plugin-content@1.0.5
  • node: Node.js v21.7.3

Reproduction

Additional Details

Steps to reproduce

I try use @originjs/vite-plugin-content@1.0.5 for my vue3 project (TS)

in vite.config.ts has

        content({
            csv: {
                enabled: true,
                csvOptions: {
                    columns: true,
                    delimiter: ";",
                    ignore_last_delimiters: true,
                }
            }
        })

get error

[vite] Internal server error: Cannot find module 'xxx/node_modules/csv-parse/lib/sync' imported from xxx/node_modules/@originjs/vite-plugin-content/dist/mjs/csvTransformation.js
Did you mean to import "csv-parse/lib/sync.js"?

may be should add .js file extension

What is Expected?

What is actually happening?

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