Skip to content

createBundleRenderer('/path/to/bundle.json') failed #5037

@wongyouth

Description

@wongyouth

createBundleRenderer('/path/to/bundle.json') failed.
but createBundleRenderer(require('/path/to/bundle.json')) succeed

And I found the pattern /\.json$/ is tested based on file content but not based on file name:

bundle = fs.readFileSync(bundle, 'utf-8')
   if (/\.json$/.test(bundle)) {

see
https://github.com/vuejs/vue/blob/dev/src/server/create-bundle-renderer.js#L47-L48

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