diff --git a/build/webpack.config.base.js b/build/webpack.config.base.js
index ad6a4db..4500563 100644
--- a/build/webpack.config.base.js
+++ b/build/webpack.config.base.js
@@ -74,10 +74,12 @@ module.exports = {
}),
new HtmlWebpackHarddiskPlugin(),
new VueLoaderPlugin(),
- new CopyWebpackPlugin([{
- from: utils.resolve('static/img'),
- to: utils.resolve('dist/static/img'),
- toType: 'dir'
- }])
+ new CopyWebpackPlugin([
+ {
+ from: utils.resolve('static/img'),
+ to: utils.resolve('dist/static/img'),
+ toType: 'dir'
+ }
+ ])
]
}
diff --git a/build/webpack.config.prod.js b/build/webpack.config.prod.js
index b6b1fda..ab1795c 100644
--- a/build/webpack.config.prod.js
+++ b/build/webpack.config.prod.js
@@ -1,16 +1,24 @@
'use strict'
const webpack = require('webpack')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
const merge = require('webpack-merge')
const baseConfig = require('./webpack.config.base')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const utils = require('./utils')
+
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
// ERROR in vendor.js from UglifyJs
// RangeError: Maximum call stack size exceeded
module.exports = merge(baseConfig, {
mode: 'production',
+ // resolve: {
+ // alias: {
+ // 'static': utils.resolve('static')
+ // }
+ // },
output: {
publicPath: '/'
},
@@ -66,6 +74,11 @@ module.exports = merge(baseConfig, {
}),
new webpack.DefinePlugin({
"process.env": "'prod'"
- })
+ }),
+ new CopyWebpackPlugin([{
+ from: utils.resolve('static/.htaccess'),
+ to: utils.resolve('dist/.htaccess'),
+ toType: 'file'
+ }])
]
})
diff --git a/static/.htaccess b/static/.htaccess
new file mode 100644
index 0000000..0e6cde9
--- /dev/null
+++ b/static/.htaccess
@@ -0,0 +1,11 @@
+
+ Options -MultiViews
+
+
+ RewriteEngine On
+ RewriteBase /
+ RewriteRule ^index\.html$ - [L]
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule . /index.html [L]
+
\ No newline at end of file