Skip to content
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

docs: transition to webpack 5, and bump deps #839

Merged
merged 5 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
433 changes: 305 additions & 128 deletions docs/dist/app.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta charset="UTF-8">
<title>Substrate API Sidecar OpenApi</title>
<link rel="icon" href="favicon.ico">
</head>
<script defer src="app.bundle.js"></script></head>

<body>
<main id="spec"></main>
<script type="text/javascript" src="app.bundle.js"></script></body>
</body>

</html>
20 changes: 10 additions & 10 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
"author": "Parity Technologies <admin@parity.io>",
"license": "GPL-3.0-or-later",
"devDependencies": {
"clean-webpack-plugin": "^1.0.1",
"copy-webpack-plugin": "^4.6.0",
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.29.3",
"webpack-cli": "^3.2.3",
"webpack-dev-server": "^3.1.14"
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^10.2.4",
"html-webpack-plugin": "^5.5.0",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4"
},
"dependencies": {
"css-loader": "^2.1.0",
"css-loader": "^6.6.0",
"json-loader": "^0.5.7",
"style-loader": "^0.23.1",
"swagger-ui": "4.1.3",
"yaml-loader": "^0.5.0"
"style-loader": "^3.3.1",
"swagger-ui": "4.5.0",
"yaml-loader": "^0.6.0"
},
"resolutions": {
"prismjs": "^1.23.0",
Expand Down
22 changes: 11 additions & 11 deletions docs/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');

const outputPath = path.resolve(__dirname, 'dist');

Expand Down Expand Up @@ -29,15 +29,15 @@ module.exports = {
],
},
plugins: [
new CleanWebpackPlugin([
outputPath,
]),
new CopyWebpackPlugin([
{
from: 'node_modules/swagger-ui/dist/oauth2-redirect.html',
to: './',
},
]),
new CleanWebpackPlugin(),
new CopyPlugin({
patterns: [
{
from: 'node_modules/swagger-ui/dist/oauth2-redirect.html',
to: './',
}
]
}),
Comment on lines +33 to +40
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, love it

new HtmlWebpackPlugin({
template: 'index.html',
}),
Expand Down
Loading