-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matěj Jehlička
committed
May 13, 2021
1 parent
5e090d4
commit 83b01f8
Showing
6 changed files
with
663 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import Vue from 'vue' | ||
import App from './App.vue' | ||
import store from './store' | ||
|
||
Vue.config.productionTip = false | ||
|
||
new Vue({ | ||
render: h => h(App), | ||
store, | ||
render: h => h(App) | ||
}).$mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Vue from 'vue' | ||
import Vuex from 'vuex' | ||
|
||
Vue.use(Vuex) | ||
|
||
export default new Vuex.Store({ | ||
state: { | ||
connected: false, | ||
ws: null, | ||
}, | ||
getters: { | ||
ws: function (state) { | ||
return state.ws | ||
}, | ||
connected: function (state) { | ||
return state.connected | ||
}, | ||
}, | ||
mutations: { | ||
initWs(state, ws) { | ||
state.ws = ws | ||
}, | ||
setConnected(state, connected) { | ||
state.connected = connected | ||
}, | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | ||
|
||
module.exports = { | ||
configureWebpack: config => { | ||
config.optimization = { | ||
runtimeChunk: 'single', | ||
minimizer: [ | ||
new OptimizeCSSAssetsPlugin({ | ||
cssProcessorPluginOptions: { | ||
preset: ['default', {discardComments: {removeAll: true}}], | ||
} | ||
}), | ||
] | ||
}; | ||
config.output = { | ||
path: path.resolve(__dirname, 'dist'), | ||
publicPath: '/', | ||
filename: 'js/[hash:5].js', | ||
chunkFilename: 'js/[id].[hash:5].js' | ||
}; | ||
config.plugins.concat([ | ||
new webpack.optimize.AggressiveMergingPlugin(), | ||
]); | ||
|
||
} | ||
} |
Oops, something went wrong.