Closed
Description
I tried bundling Plotly with Webpack but couldn't be able to do it. I created a plotly.bundle.js file and added Plotly modules that I need to that custom module.
var plotlyCore = require(__dirname +'/app/static/components/plotly.js/lib/core');
plotlyCore.register([
require(__dirname +'/app/static/components/plotly.js/lib/pie'),
require(__dirname +'/app/static/components/plotly.js/lib/choropleth'),
require(__dirname +'/app/static/components/plotly.js/lib/bar'),
require(__dirname +'/app/static/components/plotly.js/lib/heatmap'),
require(__dirname +'/app/static/components/plotly.js/lib/histogram'),
require(__dirname +'/app/static/components/plotly.js/lib/scatter'),
]);
module.exports = plotlyCore;
Then added ify loader using this configuration:
{test: /node_modules/, loader: 'ify'}
When I try to run webpack command it throws this exception:
ERROR in ../components/plotly.js/src/core.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/ploticon in /Users/buremba/Code/rakam-ui/app/static/components/plotly.js/src
@ ../components/plotly.js/src/core.js 35:16-44
ERROR in ../components/plotly.js/src/plotly.js
Module not found: Error: Cannot resolve module 'es6-promise' in /Users/buremba/Code/rakam-ui/app/static/components/plotly.js/src
@ ../components/plotly.js/src/plotly.js 22:0-22
ERROR in ../components/plotly.js/src/plotly.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/plotcss in /Users/buremba/Code/rakam-ui/app/static/components/plotly.js/src
@ ../components/plotly.js/src/plotly.js 30:0-27
ERROR in ../components/plotly.js/src/traces/bar/set_positions.js
Module not found: Error: Cannot resolve module 'fast-isnumeric' in /Users/buremba/Code/rakam-ui/app/static/components/plotly.js/src/traces/bar
@ ../components/plotly.js/src/traces/bar/set_positions.js 12:16-41
ERROR in ../components/plotly.js/src/traces/bar/calc.js
Module not found: Error: Cannot resolve module 'fast-isnumeric' in /Users/buremba/Code/rakam-ui/app/static/components/plotly.js/src/traces/bar
@ ../components/plotly.js/src/traces/bar/calc.js 12:16-41
Metadata
Metadata
Assignees
Labels
No labels