We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf99c26 commit 5d1476eCopy full SHA for 5d1476e
examples/util.js
@@ -11,6 +11,19 @@ const webpack = require('webpack');
11
module.exports = {
12
setup(config) {
13
const defaults = { mode: 'development', plugins: [], devServer: {} };
14
+
15
+ if (config.entry) {
16
+ if (typeof config.entry === 'string') {
17
+ config.entry = path.resolve(config.entry);
18
+ } else if (Array.isArray(config.entry)) {
19
+ config.entry = config.entry.map((entry) => path.resolve(entry));
20
+ } else if (typeof config.entry === 'object') {
21
+ Object.entries(config.entry).forEach(([key, value]) => {
22
+ config.entry[key] = path.resolve(value);
23
+ });
24
+ }
25
26
27
const result = Object.assign(defaults, config);
28
const before = function before(app) {
29
app.get('/.assets/*', (req, res) => {
0 commit comments