Skip to content

Get config for testing configuration (Karma) #109

@mgiraud

Description

@mgiraud

Hello,

I'm using the vue-loader and i'd like to test unit my code.

As shown in the webpack template https://github.com/vuejs-templates/webpack, you need to get the Webpack config for the karma.conf.js.

//karma.conf.js

var webpackConfig = require('../../build/webpack.test.conf')

The problem is that getting the webpack config without using the encore binary doesn't work.

Invalid config file!
  Error: Are you trying to require index.js directly?

Is there any way to get the wepack config or is there an other way to setup karmaJs for webpack-encore ?

Thx

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