Skip to content

Testing with inject-loader does not work out of the box. #947

Closed
@thomasmichaelwallace

Description

@thomasmichaelwallace

Version

2.9.3

Steps to reproduce

  • Setup a project using babel, mocha/chai and inject-loader
  • Injecting a module will return: "Module parse failed: 'import' and 'export' may only appear at the top level inject"

What is expected?

The module injection function to be returned.

What is actually happening?

Test fails due to invalid configuration.


A workaround for this is to set the VUE_CLI_BABEL_TRANSPILE_MODULES flag while testing.

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