|
@@ -2,7 +2,7 @@
|
|
|
* @fileoverview demo.
|
|
|
*
|
|
|
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
|
|
|
- * @version 0.1.0.0, Jan 24, 2019
|
|
|
+ * @version 0.2.0.0, Sep 2, 2019
|
|
|
*/
|
|
|
|
|
|
const path = require('path')
|
|
@@ -118,21 +118,30 @@ module.exports = {
|
|
|
new CopyPlugin([
|
|
|
{from: 'src/images', to: 'images'},
|
|
|
{from: 'src/js', to: 'js'},
|
|
|
- ])
|
|
|
+ ]),
|
|
|
],
|
|
|
devServer: {
|
|
|
contentBase: path.join(__dirname, '.'),
|
|
|
port: 9000,
|
|
|
host: '0.0.0.0',
|
|
|
+ before: (app) => {
|
|
|
+ app.get('/dist/js/lute/lute.wasm.br', function (req, res, next) {
|
|
|
+ res.set({
|
|
|
+ 'Content-Encoding': 'br',
|
|
|
+ 'Content-Type': 'application/wasm',
|
|
|
+ })
|
|
|
+ next()
|
|
|
+ })
|
|
|
+ },
|
|
|
proxy: {
|
|
|
'/api': {
|
|
|
target: 'http://localhost:8080',
|
|
|
- pathRewrite: {'^/api' : ''}
|
|
|
+ pathRewrite: {'^/api': ''},
|
|
|
},
|
|
|
'/hacpai': {
|
|
|
target: 'https://hacpai.com',
|
|
|
- pathRewrite: {'^/hacpai' : ''}
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ pathRewrite: {'^/hacpai': ''},
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|