I have a project that is using PouchDB and this does not seem to play well with the aurelia-webpack-plugin.
65% 101/110 build modulespath.js:8
throw new TypeError('Path must be a string. Received ' +
^
TypeError: Path must be a string. Received { './lib/extras/ajax.js': './lib/extras/ajax-browser.js',
'./lib/extras/checkpointer.js': './lib/extras/checkpointer-browser.js',
'./lib/extras/generateReplicationId.js': './lib/extras/generateReplicationId-browser.js',
'./lib/index.js': './lib/index-browser.js',
crypto: false,
fs: false,
leveldown: false }
at assertPath (path.js:8:11)
at Object.posix.resolve (path.js:426:5)
at /Users/johnmooney/Dev/MMPOC/node_modules/aurelia-webpack-plugin/index.js:22:35
at Array.forEach (native)
at getContextMap (/Users/johnmooney/Dev/MMPOC/node_modules/aurelia-webpack-plugin/index.js:15:18)
at AureliaWebpackPlugin.<anonymous> (/Users/johnmooney/Dev/MMPOC/node_modules/aurelia-webpack-plugin/index.js:56:29)
at /Users/johnmooney/Dev/MMPOC/node_modules/aurelia-webpack-plugin/index.js:90:7
at /Users/johnmooney/Dev/MMPOC/node_modules/webpack/lib/ContextModuleFactory.js:124:5
at /Users/johnmooney/Dev/MMPOC/node_modules/async/lib/async.js:52:16
at /Users/johnmooney/Dev/MMPOC/node_modules/async/lib/async.js:361:13
What appears to be happening is that the plugin is processing the PouchDB package.json file and within that it is processing the browser section and throwing the error.
"browser": {
"./lib/extras/ajax.js": "./lib/extras/ajax-browser.js",
"./lib/extras/checkpointer.js": "./lib/extras/checkpointer-browser.js",
"./lib/extras/generateReplicationId.js": "./lib/extras/generateReplicationId-browser.js",
"./lib/index.js": "./lib/index-browser.js",
"crypto": false,
"fs": false,
"leveldown": false
},
I'm no expert on webpack.
Why is the plugin processing this file?
The PouchDB team did some work to make PouchDB work with webpack and as far as I know they use rollup to bundle their stuff in to js files for webpack. I don't know why the plugin isn't including the dist folder instead.
I have a project that is using PouchDB and this does not seem to play well with the aurelia-webpack-plugin.
What appears to be happening is that the plugin is processing the PouchDB package.json file and within that it is processing the browser section and throwing the error.
I'm no expert on webpack.
Why is the plugin processing this file?
The PouchDB team did some work to make PouchDB work with webpack and as far as I know they use rollup to bundle their stuff in to js files for webpack. I don't know why the plugin isn't including the dist folder instead.