docs(samples-webpack): updated config and dependencies (#8184)
This commit is contained in:
@@ -9,18 +9,18 @@
|
||||
"author": "Shaun Luttin",
|
||||
"license": "Apache-2.0",
|
||||
"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": "^11.0.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-dev-server": "^4.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"css-loader": "^2.1.0",
|
||||
"css-loader": "^6.7.1",
|
||||
"json-loader": "^0.5.7",
|
||||
"style-loader": "^0.23.1",
|
||||
"swagger-ui": "^3.20.7",
|
||||
"yaml-loader": "^0.5.0"
|
||||
"style-loader": "^3.3.1",
|
||||
"swagger-ui": "^4.14.0",
|
||||
"yaml-loader": "^0.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
const outputPath = path.resolve(__dirname, 'dist');
|
||||
@@ -19,7 +19,7 @@ module.exports = {
|
||||
test: /\.yaml$/,
|
||||
use: [
|
||||
{ loader: 'json-loader' },
|
||||
{ loader: 'yaml-loader' }
|
||||
{ loader: 'yaml-loader', options:{ asJSON: true } }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -32,17 +32,15 @@ module.exports = {
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin([
|
||||
outputPath
|
||||
]),
|
||||
new CopyWebpackPlugin([
|
||||
new CleanWebpackPlugin(),
|
||||
new CopyWebpackPlugin({patterns:[
|
||||
{
|
||||
// Copy the Swagger OAuth2 redirect file to the project root;
|
||||
// that file handles the OAuth2 redirect after authenticating the end-user.
|
||||
from: require.resolve('swagger-ui/dist/oauth2-redirect.html'),
|
||||
to: './'
|
||||
}
|
||||
]),
|
||||
]}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'index.html'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user