Skip to content

Commit

Permalink
Small refactoring in webpack configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Pamplemousse committed Jan 5, 2025
1 parent 37c1d16 commit b5c575b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ var TARGET_ENV = process.env.npm_lifecycle_event === 'build' ? 'production' : 'd

// common webpack config
var commonConfig = {
entry: [
path.join(__dirname, 'front', 'static', 'index.js')
],

output: {
path: path.resolve(__dirname, 'dist/'),
filename: '[contenthash].js'
Expand Down Expand Up @@ -51,10 +55,6 @@ if (TARGET_ENV === 'development') {
console.log('Serving locally...')

module.exports = merge(commonConfig, {
entry: [
path.join(__dirname, 'front', 'static', 'index.js')
],

devServer: {
static: [
{
Expand Down Expand Up @@ -109,8 +109,6 @@ if (TARGET_ENV === 'production') {
console.log('Building for prod...')

module.exports = merge(commonConfig, {
entry: path.join(__dirname, 'front', 'static', 'index.js'),

mode: 'production',

module: {
Expand Down

0 comments on commit b5c575b

Please sign in to comment.