update input

This commit is contained in:
weboko 2023-02-02 00:41:04 +01:00
parent 9413269e38
commit fbde0f5cae
No known key found for this signature in database

View File

@ -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,
});
};