Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
83 changes: 83 additions & 0 deletions script-hook-website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions script-hook-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"devDependencies": {
"@types/react-syntax-highlighter": "^15.5.13",
"copy-webpack-plugin": "^13.0.0",
"css-loader": "^6.7.3",
"gh-pages": "^6.3.0",
"html-webpack-plugin": "^5.5.1",
Expand Down
10 changes: 10 additions & 0 deletions script-hook-website/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = (env, argv) => {
const isProduction = argv.mode === 'production';
Expand Down Expand Up @@ -41,6 +42,15 @@ module.exports = (env, argv) => {
'Expires': {'http-equiv': 'Expires', 'content': '0'}
}
}),
new CopyWebpackPlugin({
patterns: [
{
from: 'public/images',
to: 'images'
},
// 如果有其他静态资源也需要复制,可以在这里添加
]
}),
],
devServer: {
static: {
Expand Down