[Vuejs]-Symfony Encore: Karma and *.vue Components

0👍

Thanks to everyone who silently tried to help me 🙂 I found the problem, a plugin was required but not loaded:

var webpackConfig = require('./webpack.config');
var ExtractTextPlugin = require("extract-text-webpack-plugin");

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['mocha', 'chai', 'sinon'],
    files: [
      'src/assets/scripts/**/*.spec.ts',
    ],
    exclude: [],
    preprocessors: {
      'src/assets/scripts/**/*.ts': ['webpack'],
    },
    webpack: {
      module: webpackConfig.module,
      resolve: webpackConfig.resolve,
      // This is the relevant bit:
      plugins: [
        new ExtractTextPlugin("app.styles.css") 
      ]
    },
    webpackMiddleware: {
      noInfo: true,
      stats: 'errors-only',
    },
    reporters: ['progress'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['PhantomJS'],
    singleRun: false,
    concurrency: Infinity,
  });
};

Works like a charm now 🙂

Leave a comment