(entry)
| 82 | } |
| 83 | |
| 84 | function normalizeEntry(entry) { |
| 85 | if (Array.isArray(entry)) { |
| 86 | return { |
| 87 | main: entry |
| 88 | } |
| 89 | } else if (typeof entry === 'string') { |
| 90 | return { |
| 91 | main: [entry] |
| 92 | } |
| 93 | } else if (typeof entry === 'object') { |
| 94 | Object.keys(entry).forEach(entryName => { |
| 95 | if (!Array.isArray(entry[entryName])) { |
| 96 | entry[entryName] = [entry[entryName]] |
| 97 | } |
| 98 | }) |
| 99 | return entry |
| 100 | } else { |
| 101 | throw new Error(`Expected entry point to be object, array or string. Instead got: ${entry}`) |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * @see https://webpack.github.io/docs/configuration.html#plugins |
no outgoing calls
no test coverage detected
searching dependent graphs…