问题标签 [mocha-webpack]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
34 浏览

javascript - output.filename 键的类型问题

当我运行时,我的 Nextcloud 的 webpack 出现问题npm test...

我的 webpack 版本

包.json

webpack.test.config.js

问题

当我运行npm testornpm run test时,我收到此错误:

但是,如果我将filename: ${appName}-[name].js,替换为filename: path.resolve(/js/${appName}-[name].js ),,我会收到以下错误消息:

它要求我不要放置绝对路径,但它也要求我放置绝对路径......所以,我不明白这里的问题出在哪里:/