-
-
Notifications
You must be signed in to change notification settings - Fork 137
Can't resolve 'vertx' in '~/node_modules/plotly.js/dist' #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you checked out https://github.com/plotly/plotly-webpack ? |
Those loaders didn't send to have any effect other then break other libs |
If you load the dist you need no additional loaders and you can use the ignore plugin to suppress the vertx warning. If you load plotly from source you will have to use the ify plugin etc |
Instructions aren't super clear, are you saying to do this for a pre-compiled build? // Import pre-compiled es5 version of plotly
import Plotly from 'plotly.js/dist/plotly';
// Create new react-plotly instance from pre-compiled version
import createPlotlyComponent from 'react-plotly.js/factory';
const Plot = createPlotlyComponent(Plotly); Edit: This seems to be the best way to use Plotly, only include the charts you are actually using. Doing things this way greatly reduced my build times when uglifying/minifying my js + much smaller overall bundle import PlotlyCore from 'plotly.js/lib/core';
import SankeyChart from 'plotly.js/lib/sankey';
import createPlotlyComponent from 'react-plotly.js/factory';
// Create DIY Plotly Bundle
PlotlyCore.register([ SankeyChart ]);
const Plotly = createPlotlyComponent(PlotlyCore);
{...}
<Plotly /> |
I used |
I've updated https://github.com/plotly/plotly-webpack to explain the |
I get the above warning in development, although plotly appears to work just fine.
There seems to be a lot of mixed opinions on how to get react-plotly working in a webpack setup, in my case I'm not using ify-loader
Here's my js webpack rules if it helps
Edit:
I just realized that I can't build production if I'm using UglifyJS, the build process just goes on forever. If I comment out uglifyjs the build completes in a few minutes and runs fine. Any ideas here?
The text was updated successfully, but these errors were encountered: