Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

docs: fix js dependencies in webpack example #1027

Merged
merged 7 commits into from
Oct 22, 2017
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/browser-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wha does the babel-preset-stage-0 do and why do we need it here?

Copy link
Contributor Author

@dfguo dfguo Sep 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why it was included in the .babelrc https://github.com/ipfs/js-ipfs/blob/master/examples/browser-webpack/.babelrc

We can perhaps take that away if that wasn't needed too.

"json-loader": "^0.5.4",
"react": "^15.5.4",
"react-hot-loader": "^1.3.1",
"webpack": "^2.5.1",
"webpack-dev-server": "^2.4.5"
},
"dependencies": {
"safe-buffer": "^5.0.1"
"ipfs": "file:../../",
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
}
4 changes: 1 addition & 3 deletions examples/browser-webpack/src/components/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict'

const React = require('react')
const Buffer = require('safe-buffer').Buffer
const IPFS = require('../../../../src/core') // replace this by line below
// const IPFS = require('ipfs')
const IPFS = require('ipfs')

const stringToUse = 'hello world from webpacked IPFS'

Expand Down