From 60f92904ccc4282a8fd316609bd1f6226aee6d1e Mon Sep 17 00:00:00 2001 From: Alfred Melch Date: Fri, 13 Mar 2020 12:00:29 +0100 Subject: [PATCH] copy books to build dir --- webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 1786305..11316b7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ const path = require('path') +const CopyPlugin = require('copy-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') @@ -58,8 +59,9 @@ module.exports = (env, argv) => { name: entrypoint => `runtime-${entrypoint.name}` } }, - resolve: { modules: ['src', 'lib', 'node_modules'] }, + resolve: { modules: ['src', 'node_modules'] }, plugins: [ + new CopyPlugin([{ from: 'books', to: 'books' }]), // creat an index.html new HtmlWebpackPlugin(), // show a progress bar