Skip to content

Commit

Permalink
fix: add static mw
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Jan 6, 2019
1 parent d3b5950 commit b3f4746
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"egg": "^2.2.1",
"egg-scripts": "^2.5.0",
"egg-sequelize": "^4.2.0",
"egg-static": "^2.1.1",
"egg-validate": "^1.0.0",
"lodash.get": "^4.4.2",
"moment": "^2.22.2",
Expand Down
4 changes: 2 additions & 2 deletions view/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
var assetsUrl = window.pageConfig.assetsUrl || '//' + location.hostname + ':' + location.port;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = assetsUrl + '/dist/reliable-view.js';
script.src = assetsUrl + '/public/reliable-view.js';
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = assetsUrl + '/dist/reliable-view.css';
link.href = assetsUrl + '/public/reliable-view.css';
var head = document.getElementsByTagName('head')[0];
head.appendChild(link);
head.appendChild(script);
Expand Down
4 changes: 2 additions & 2 deletions view/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ module.exports = (env, argv) => {
},

output: {
path: path.join(__dirname, '..', 'app', 'public', 'dist'),
publicPath: 'dist',
path: path.join(__dirname, '..', 'app', 'public'),
publicPath: 'public',
filename: '[name].js',
},

Expand Down

0 comments on commit b3f4746

Please sign in to comment.