From 1edb23826ffe80ad378f61eb9fbb94644a8d20b6 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 30 Aug 2019 20:21:32 +0200 Subject: [PATCH] robots.txt --- package.json | 1 + src/Static/robots.txt | 2 ++ webpack.config.js | 4 ++++ 3 files changed, 7 insertions(+) create mode 100644 src/Static/robots.txt diff --git a/package.json b/package.json index cc5637a..434ec49 100755 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@types/react-dom": "^16.8", "@types/react-router-dom": "^4.3.1", "awesome-typescript-loader": "^5", + "copy-webpack-plugin": "^5.0.4", "css-loader": "3", "file-loader": "4", "html-webpack-plugin": "3", diff --git a/src/Static/robots.txt b/src/Static/robots.txt new file mode 100644 index 0000000..14267e9 --- /dev/null +++ b/src/Static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 3712a66..e004954 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,6 +2,7 @@ const path = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin') +const CopyPlugin = require('copy-webpack-plugin') module.exports = { entry: [ @@ -27,6 +28,9 @@ module.exports = { new MiniCssExtractPlugin({ filename: 'bundle.css', }), + new CopyPlugin([ + { from: 'Static/robots.txt', to: '.' }, + ]), ], stats: { assets: true,