diff options
Diffstat (limited to 'webpack.config.js')
| -rw-r--r-- | webpack.config.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/webpack.config.js b/webpack.config.js index aa6ca6c..717ce50 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,11 +1,11 @@ const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); const package = require('./package.json'); module.exports = { - context: path.resolve(__dirname, 'src'), - entry: './index.js', - mode: 'development', + // context: path.resolve(__dirname, 'src'), + entry: './src/index.js', module: { rules: [ { @@ -18,7 +18,19 @@ module.exports = { }, ], }, + mode: 'development', + devtool: 'inline-source-map', + devServer: { + contentBase: './dist', + }, plugins: [ - new HtmlWebpackPlugin({ title: 'FediDag' }), + new HtmlWebpackPlugin({ + title: 'FediDag' + }), + new CopyWebpackPlugin({ patterns: [ 'lib/*' ] }), ], + output: { + filename: '[name].bundle.js', + path: path.resolve(__dirname, 'dist'), + }, } |
