From fbde0f5caed13d5567e8d5ed4a422f98564ba560 Mon Sep 17 00:00:00 2001 From: weboko Date: Thu, 2 Feb 2023 00:41:04 +0100 Subject: [PATCH] update input --- karma.conf.cjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/karma.conf.cjs b/karma.conf.cjs index 75b648f..82ba303 100644 --- a/karma.conf.cjs +++ b/karma.conf.cjs @@ -7,9 +7,13 @@ const { nodeResolve } = require("@rollup/plugin-node-resolve"); const commonjs = require("@rollup/plugin-commonjs"); const json = require("@rollup/plugin-json"); +const output = { + path: path.join(os.tmpdir(), "_karma_webpack_") + Math.floor(Math.random() * 1000000), +}; + const rollupConfig = { input: { - index: "dist/index.js", + index: `${output.path}/dist/index.js`, }, output: { dir: "bundle", @@ -26,10 +30,6 @@ const rollupConfig = { ], }; -const output = { - path: path.join(os.tmpdir(), "_karma_webpack_") + Math.floor(Math.random() * 1000000), -}; - module.exports = function (config) { config.set({ frameworks: ["mocha"], @@ -54,6 +54,6 @@ module.exports = function (config) { timeout: 6000, // Default is 2s }, }, - rollupPreprocessor: { ...rollupConfig }, + rollupPreprocessor: rollupConfig, }); };