Skip to content

Refactor: Add a constants file which exports all constants throughout the application #772

@anshumanv

Description

@anshumanv

Do you want to request a feature or report a bug?
Discussion for a possible refactor

What is the current behavior?
We're using a bunch of constants throught the code (

const NON_COMPILATION_ARGS = [
), (
const CONFIG_GROUP = "Config options:";
) and a lot more. I think it makes sense to bunch them all up in a single file (maybe call constants.js?) and use it wherever needed.

What is the expected behavior?
Single file which exports all constants which is imported whereever needed (a possible refactor).

If this is a feature request, what is motivation or use case for changing the behavior?
Not a feature request.

Please paste the results of webpack-cli info here, and mention other relevant information such as programming language.

webpack-cli info

  System:
    OS: macOS 10.14.3
    CPU: (4) x64 Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
  Binaries:
    Node: 10.14.1 - /usr/local/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 72.0.3626.119
    Safari: 12.0.3
  npmPackages:
    webpack: 4.x.x => 4.29.6
    webpack-dev-server: ^3.1.10 => 3.2.1

Will do a quick PR in case we agree to proceed with this. 😄

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions