Skip to content

Commit 790d470

Browse files
Merge pull request #2011 from plotly/update-readme-with-ify-loader-version
add minimum ify-loader version to readme
2 parents 11bb997 + 3430078 commit 790d470

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

README.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![circle ci](https://circleci.com/gh/plotly/plotly.js.png?&style=shield&circle-token=1f42a03b242bd969756fc3e53ede204af9b507c0)](https://circleci.com/gh/plotly/plotly.js)
55

66
#### 📢 Announcement!
7-
#### Seats are still available for a 2 day, Plotly.js master class in NYC, November 16-17.
7+
#### Seats are still available for a 2 day, Plotly.js master class in NYC, November 16-17.
88
#### [Registration here](https://plotcon.plot.ly/workshops) 🎨 📈 🗽
99

1010
***
@@ -109,9 +109,23 @@ Important: the plotly.js code base contains some non-ascii characters. Therefore
109109
```
110110

111111

112-
#### Webpack Usage with Modules
112+
#### Building plotly.js with Webpack
113113

114-
Browserify [transforms](https://github.com/substack/browserify-handbook#transforms) are required to build plotly.js, namely, [glslify](https://github.com/stackgl/glslify) to transform WebGL shaders and [cwise](https://github.com/scijs/cwise) to compile component-wise array operations. To make the trace module system work with Webpack, you will need to install [ify-loader](https://github.com/hughsk/ify-loader) and add it to your `webpack.config.json` for your build to correctly bundle plotly.js files.
114+
For plotly.js to build with Webpack you will need to install [[email protected]+](https://github.com/hughsk/ify-loader) and add it to your `webpack.config.json`. This adds Browserify transform compatibility to Webpack which is necessary for some plotly.js dependencies.
115+
116+
A repo that demonstrates how to build plotly.js with Webpack can be found [here](https://github.com/rreusser/plotly-webpack). In short add `ify-loader` to the `module` section in your `webpack.config.js`:
117+
```js
118+
...
119+
module: {
120+
loaders: [
121+
{
122+
test: /\.js$/,
123+
loader: 'ify-loader'
124+
}
125+
]
126+
},
127+
...
128+
```
115129

116130
## Bugs and feature requests
117131

0 commit comments

Comments
 (0)