copy books to build dir

context-store
Alfred Melch 5 years ago
parent c2379ff768
commit 60f92904cc

@ -1,5 +1,6 @@
const path = require('path') const path = require('path')
const CopyPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin')
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin') const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
@ -58,8 +59,9 @@ module.exports = (env, argv) => {
name: entrypoint => `runtime-${entrypoint.name}` name: entrypoint => `runtime-${entrypoint.name}`
} }
}, },
resolve: { modules: ['src', 'lib', 'node_modules'] }, resolve: { modules: ['src', 'node_modules'] },
plugins: [ plugins: [
new CopyPlugin([{ from: 'books', to: 'books' }]),
// creat an index.html // creat an index.html
new HtmlWebpackPlugin(), new HtmlWebpackPlugin(),
// show a progress bar // show a progress bar

Loading…
Cancel
Save