* feat: search options * feat: sanitize folder names * fix: add cursor: pointer to switch * fix: explicitly make the search bar a text input * refactor: remove magic number * refactor: extract Switch component to its own file * refactor: split AppState into multiple files * refactor: review comments
34 lines
906 B
JavaScript
34 lines
906 B
JavaScript
const { merge } = require('webpack-merge');
|
|
const config = require('./webpack.config.js');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
|
module.exports = (env, argv) => {
|
|
const port = argv.port || 3001;
|
|
return merge(config(env, argv), {
|
|
mode: 'development',
|
|
/** Only create an html file for the dev-server */
|
|
plugins: argv.liveReload ? [
|
|
new HtmlWebpackPlugin({
|
|
template: './index.html',
|
|
templateParameters: {
|
|
env: process.env
|
|
},
|
|
}),
|
|
] : [],
|
|
devServer: {
|
|
proxy: {
|
|
'/extensions': {
|
|
target: `http://localhost:${port}`,
|
|
pathRewrite: { '^/extensions': '/public/extensions' }
|
|
},
|
|
'/assets': {
|
|
target: `http://localhost:${port}`,
|
|
pathRewrite: { '^/assets': '/public/assets' }
|
|
},
|
|
},
|
|
port,
|
|
writeToDisk: argv.writeToDisk,
|
|
}
|
|
});
|
|
};
|