Commit 9d380b9
committed
Ensure browserResolve has a default filename
Please see:
rollup#38
and
browserify/browser-resolve#80
for how Node v6+ throws a TypeError if `path.dirname` is passed an undefined value. `node-browser-resolve` currently does not use set a default value if it's `opts.filename` is not specified resulting in the following stack trace:
```javascript
[19:40:45] TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.dirname (path.js:1324:5)
at resolve (/my_app/node_modules/browser-resolve/index.js:218:21)
at /my_app/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:46:5
at resolveId (/my_app/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:45:11)
at /my_app/node_modules/rollup/dist/rollup.js:2123:32
at tryCatch (/my_app/node_modules/rollup/dist/rollup.js:393:12)
at invokeCallback (/my_app/node_modules/rollup/dist/rollup.js:405:13)
at publish (/my_app/node_modules/rollup/dist/rollup.js:376:7)
at flush (/my_app/node_modules/rollup/dist/rollup.js:120:5)
```1 parent e93b540 commit 9d380b9
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
| |||
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| |||
0 commit comments