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

Commit

Permalink
docs: update browser-webpack example (#1823)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
  • Loading branch information
Alan Shaw authored Jan 18, 2019
1 parent 473346a commit 7d9b006
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
6 changes: 0 additions & 6 deletions examples/browser-webpack/.babelrc

This file was deleted.

27 changes: 16 additions & 11 deletions examples/browser-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@
"license": "MIT",
"keywords": [],
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"json-loader": "~0.5.4",
"react": "^15.5.4",
"react-dom": "^15.6.1",
"react-hot-loader": "^1.3.1",
"webpack": "^2.5.1",
"webpack-dev-server": "^2.4.5"
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-hot-loader": "^4.6.3",
"webpack": "^4.28.4",
"webpack-dev-server": "^3.1.14"
},
"dependencies": {
"ipfs": "file:../../"
}
},
"browserslist": [
">1%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
17 changes: 12 additions & 5 deletions examples/browser-webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ module.exports = {
new webpack.HotModuleReplacementPlugin()
],
module: {
loaders: [{
test: /\.js$/,
loaders: ['react-hot-loader', 'babel-loader'],
include: path.join(__dirname, 'src')
}, { test: /\.json$/, loader: 'json-loader' }]
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react']
}
}
}
]
},
node: {
fs: 'empty',
Expand Down

0 comments on commit 7d9b006

Please sign in to comment.