Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/webpack-dev-server.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const webpack = require('webpack');
const path = require('path');
const buildPath = path.resolve(__dirname, 'src/www');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');

const config = {
// Entry point to the project
Expand All @@ -26,6 +26,8 @@ const config = {
hot: true,
inline: true,
port: 3000,
// Required for webpack-dev-server.
outputPath: buildPath,
},
devtool: 'eval',
// Output file config
Expand All @@ -34,15 +36,13 @@ const config = {
filename: 'app.js', // Name of output file
},
plugins: [
// Used to include index.html in build folder
new HtmlWebpackPlugin({
inject: false,
template: path.join(__dirname, '/src/www/index.html'),
}),
// Allows for sync with browser while developing (like BorwserSync)
new webpack.HotModuleReplacementPlugin(),
// Allows error warninggs but does not stop compiling. Will remove when eslint is added
new webpack.NoErrorsPlugin(),
new CopyWebpackPlugin([
{from: 'src/www/index.html'},
]),
],
externals: {
fs: 'js', // To remove once https://github.com/benjamn/recast/pull/238 is released
Expand Down