'use strict';
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
function KarmaWebpackOutputFramework(config) {
// This controller is instantiated and set during the preprocessor phase.
const controller = config.__karmaWebpackController;
// only if webpack has instantiated its controller
if (!controller) {
console.warn(
"Webpack has not instantiated controller yet.\n" +
"Check if you have enabled webpack preprocessor and framework before this framework"
);
return
}
config.files.push({
pattern: `${controller.outputPath}/**/*`,
included: false,
served: true,
watched: false
});
}
KarmaWebpackOutputFramework.$inject = ['config'];
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
module.exports = {
'framework:webpack-output': ['factory', KarmaWebpackOutputFramework],
};