Skip to content

Commit 84dde4f

Browse files
committed
copy static folder
1 parent 12c3d64 commit 84dde4f

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

template/build/webpack.base.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const path = require('path')
33
const webpack = require('webpack')
44
const HtmlWebpackPlugin = require('html-webpack-plugin')
5+
const CopyWebpackPlugin = require('copy-webpack-plugin')
56
const config = require('./config')
67
const _ = require('./utils')
78

@@ -64,7 +65,14 @@ module.exports = {
6465
template: __dirname + '/index.html',
6566
filename: _.outputIndexPath
6667
}),
67-
new webpack.LoaderOptionsPlugin(_.loadersOptions())
68+
new webpack.LoaderOptionsPlugin(_.loadersOptions()),
69+
new CopyWebpackPlugin([
70+
{
71+
from: _.cwd('./static'),
72+
// to the roor of dist path
73+
to: './'
74+
}
75+
])
6876
],
6977
target: _.target
7078
}

template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"babel-preset-es2015": "^6.14.0",
3131
"babel-preset-stage-1": "^6.13.0",
3232
"chalk": "^1.1.3",
33+
"copy-webpack-plugin": "^4.0.1",
3334
"css-loader": "^0.23.1",
3435
"cross-env": "^2.0.0",
3536
{{#electron}}

template/static/favicon.ico

27.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)