Skip to content

Commit

Permalink
fix: optimize build process
Browse files Browse the repository at this point in the history
Now the vue loader will build the vue files into js code.
So we don't need full vue in renderer


Former-commit-id: 6523670
  • Loading branch information
ci010 committed Jul 15, 2019
1 parent 8bc7530 commit 9944931
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/webpack.main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const mainConfig = {
extensions: ['.js', '.json', '.node'],
alias: {
main: path.join(__dirname, '../src/main'),
vue$: 'vue/dist/vue.runtime.esm.js',
static: path.join(__dirname, '../static'),
universal: path.join(__dirname, '../src/universal'),
},
Expand Down
2 changes: 0 additions & 2 deletions scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ const rendererConfig = {
},
resolve: {
alias: {
'@': path.join(__dirname, '../src/renderer'),
renderer: path.join(__dirname, '../src/renderer'),
vue$: 'vue/dist/vue.esm.js',
static: path.join(__dirname, '../static'),
universal: path.join(__dirname, '../src/universal'),
},
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Vue.component('skin-view', SkinView);
* @param {import('vue').ComponentOptions} option
*/
export default function (option) {
const App = require('./App').default;
const vue = new Vue({
components: { App: require('./App').default },
template: '<App/>',
...option,
render: h => h(App),
});
Vue.prototype.$repo = vue.$store;
vue.$mount('#app');
Expand Down

0 comments on commit 9944931

Please sign in to comment.