diff --git a/config/webpack.config.common.js b/config/webpack.config.common.js index d320d5f..7d5ae21 100644 --- a/config/webpack.config.common.js +++ b/config/webpack.config.common.js @@ -11,15 +11,15 @@ const webpackConfig = function(isDev) { resolve: { extensions: [".js", ".vue"], alias: { - vue$: "vue/dist/vue.min.js", - "@": helpers.root("frontend") - } + "vue$": "vue/dist/vue.min.js", + "@": helpers.root("frontend"), + }, }, entry: { - vinlottis: helpers.root("frontend", "vinlottis-init") + vinlottis: helpers.root("frontend", "vinlottis-init"), }, externals: { - moment: 'moment' // comes with chart.js + moment: "moment", // comes with chart.js }, module: { rules: [ @@ -31,45 +31,45 @@ const webpackConfig = function(isDev) { options: { loaders: { scss: "vue-style-loader!css-loader!sass-loader", - sass: "vue-style-loader!css-loader!sass-loader?indentedSyntax" - } - } - } - ] + sass: "vue-style-loader!css-loader!sass-loader?indentedSyntax", + }, + }, + }, + ], }, { test: /\.js$/, - use: [ "babel-loader" ], - include: [helpers.root("frontend")] + use: ["babel-loader"], + include: [helpers.root("frontend")], }, { test: /\.css$/, use: [ MiniCSSExtractPlugin.loader, - { loader: "css-loader", options: { sourceMap: isDev } } - ] + { loader: "css-loader", options: { sourceMap: isDev } }, + ], }, { test: /\.scss$/, use: [ MiniCSSExtractPlugin.loader, { loader: "css-loader", options: { sourceMap: isDev } }, - { loader: "sass-loader", options: { sourceMap: isDev } } - ] + { loader: "sass-loader", options: { sourceMap: isDev } }, + ], }, { test: /\.woff(2)?(\?[a-z0-9]+)?$/, loader: "url-loader", options: { limit: 10000, - mimetype: "application/font-woff" - } + mimetype: "application/font-woff", + }, }, { test: /\.(ttf|eot|svg)(\?[a-z0-9]+)?$/, - loader: "file-loader" - } - ] + loader: "file-loader", + }, + ], }, plugins: [ new VueLoaderPlugin(), diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index db53127..a08f04a 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -15,20 +15,20 @@ let webpackConfig = merge(commonConfig(true), { output: { path: helpers.root("dist"), publicPath: "/", - filename: "js/[name].bundle.js" + filename: "js/[name].bundle.js", }, optimization: { concatenateModules: true, splitChunks: { - chunks: "initial" - } + chunks: "initial", + }, }, plugins: [ new webpack.EnvironmentPlugin(environment), new FriendlyErrorsPlugin(), new MiniCSSExtractPlugin({ - filename: "css/[name].css" - }) + filename: "css/[name].css", + }), ], devServer: { compress: true, @@ -37,29 +37,29 @@ let webpackConfig = merge(commonConfig(true), { hot: true, overlay: true, stats: { - normal: true + normal: true, }, proxy: { "/api": { target: "http://localhost:30030", - changeOrigin: true + changeOrigin: true, }, "/socket.io": { target: "ws://localhost:30030", changeOrigin: false, - ws: true - } + ws: true, + }, }, - writeToDisk: false - } + writeToDisk: false, + }, }); webpackConfig = merge(webpackConfig, { plugins: [ new HtmlWebpackPlugin({ - template: "frontend/templates/Index.html" - }) - ] + template: "frontend/templates/Index.html", + }), + ], }); module.exports = webpackConfig; diff --git a/frontend/Vinlottis.vue b/frontend/Vinlottis.vue index 40ae38a..769c744 100644 --- a/frontend/Vinlottis.vue +++ b/frontend/Vinlottis.vue @@ -1,6 +1,6 @@ \ No newline at end of file + diff --git a/frontend/vinlottis-init.js b/frontend/vinlottis-init.js index 0aeb331..bf13b66 100644 --- a/frontend/vinlottis-init.js +++ b/frontend/vinlottis-init.js @@ -21,7 +21,7 @@ if (ENV !== "development") { beforeSend: event => { console.error(event); return event; - } + }, }); } @@ -38,7 +38,7 @@ ga.l = 1 * new Date(); ga("create", __GA_TRACKINGID__, { allowAnchor: false, cookieExpires: __GA_COOKIELIFETIME__, // Time in seconds - cookieFlags: "SameSite=Strict; Secure" + cookieFlags: "SameSite=Strict; Secure", }); ga("set", "anonymizeIp", true); // Enable IP Anonymization/IP masking ga("send", "pageview"); @@ -47,7 +47,7 @@ if (ENV == "development") window[`ga-disable-${__GA_TRACKINGID__}`] = true; const router = new VueRouter({ routes: routes, - mode: 'history' + mode: "history", }); new Vue({