const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const PurgecssPlugin = require('purgecss-webpack-plugin');
const glob = require('glob');
const isDev = process.env.NODE_ENV === 'development';
const isProd = !isDev;
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'assets/js/bundle.js'
},
module: {
rules: [{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader'
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
// options...
}
}
]
}]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'assets/css/style.css'
}),
new HtmlWebpackPlugin({
template: "./src/index.html"
}),
]
};
var alertwin = getCookie("alertwin");
if (alertwin != "no") {
if (e.clientY < 0) {
$(".overlay_stop").fadeIn("fast");
// записываем cookie на 1 день, с которой мы не показываем окно
var date = new Date;
date.setDate(date.getDate() + 1);
document.cookie = "alertwin=no; path=/; expires=" + date.toUTCString();
}
}
$(document).mouseleave(function(e){
var alertwin = getCookie("alertwin");
if(alertwin != "no") {
if (e.clientY < 0) {
$(".overlay_stop").fadeIn("fast");
// записываем cookie на 1 день, с которой мы не показываем окно
var date = new Date;
date.setDate(date.getDate() + 1);
document.cookie = "alertwin=no; path=/; expires=" + date.toUTCString();
}
}
});