Skip to content

prod conf is loaded when npm run dev #877

Closed
@lucidfrontier45

Description

@lucidfrontier45

The recent change of #864 is problematic since webpack.prod.conf.js is loaded when running dev-server by npm run dev. The most critical problem for me is that the auto-reload feature doesn't work at all.

I don't know the context of the fix #864 but the conditional operator seems wrong.

Changing

var webpackConfig = process.env.NODE_ENV === 'testing' || 'production'
  ? require('./webpack.prod.conf')
  : require('./webpack.dev.conf')

to

var webpackConfig = (process.env.NODE_ENV === 'testing' || process.env.NODE_ENV === 'production')
  ? require('./webpack.prod.conf')
  : require('./webpack.dev.conf')

works for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions