Добавлена генерация файла sitemap при сборке проекта

This commit is contained in:
ErickSkrauch 2017-12-23 02:00:52 +03:00
parent 7dbd569d45
commit a071789e52
3 changed files with 17 additions and 0 deletions

View File

@ -106,6 +106,7 @@
"sass-loader": "^4.0.0", "sass-loader": "^4.0.0",
"scripts": "file:./scripts", "scripts": "file:./scripts",
"sinon": "^3.2.1", "sinon": "^3.2.1",
"sitemap-webpack-plugin": "^0.5.1",
"style-loader": "^0.18.0", "style-loader": "^0.18.0",
"unexpected": "^10.33.2", "unexpected": "^10.33.2",
"unexpected-sinon": "^10.5.1", "unexpected-sinon": "^10.5.1",

View File

@ -10,6 +10,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const cssUrl = require('webpack-utils/cssUrl'); const cssUrl = require('webpack-utils/cssUrl');
const cssImport = require('postcss-import'); const cssImport = require('postcss-import');
const SitemapPlugin = require('sitemap-webpack-plugin').default;
const localeFlags = require('./src/components/i18n/localeFlags').default; const localeFlags = require('./src/components/i18n/localeFlags').default;
const SUPPORTED_LANGUAGES = Object.keys(require('./src/i18n/index.json')); const SUPPORTED_LANGUAGES = Object.keys(require('./src/i18n/index.json'));
@ -132,6 +133,17 @@ const webpackConfig = {
collapseWhitespace: isProduction collapseWhitespace: isProduction
} }
}), }),
new SitemapPlugin('https://account.ely.by', [
'/',
'/register',
'/resend-activation',
'/activation',
'/forgot-password',
'/rules',
], {
lastMod: true,
changeFreq: 'weekly',
}),
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
React: 'react' React: 'react'
}), }),

View File

@ -6174,6 +6174,10 @@ sinon@^3.2.1:
text-encoding "0.6.4" text-encoding "0.6.4"
type-detect "^4.0.0" type-detect "^4.0.0"
sitemap-webpack-plugin@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/sitemap-webpack-plugin/-/sitemap-webpack-plugin-0.5.1.tgz#b60749402eee37d43866940e3a66200b86e55099"
slash@^1.0.0: slash@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"