Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !7172

Make allow customize `/dist` naming from consumer's package.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/Kyr/feature/modify-webpack-config-for-build-flat-dist into master Jun 05, 2019
  • Overview 6
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: Kyr

Motivation. For the some reasons I would to have ability to customize naming in /dist. postbuild script approach not very comfortable and needs an appropriate modification of manifestos.

This approach use optional naming schema configuration in consumer's package.json, for example "flat" structure:

...
  "distNaming": {
    "output": {
      "development": {
        "filename": "bundle.js",
        "chunkFilename": "[name].chunk.js"
      },
      "production": {
        "filename": "[name].[contenthash:8].js",
        "chunkFilename": "[name].[contenthash:8].chunk.js"
      }
    },
    "media": {
      "filename": "[name].[hash:8].[ext]"
    },
    "files": {
      "filename": "[name].[hash:8].[ext]"
    },
    "css": {
      "filename": "[name].[contenthash:8].css",
      "chunkFilename": "[name].[contenthash:8].chunk.css"
    }
  }
...

Such config applied to default naming schema and then used in webpack's config factory.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/Kyr/feature/modify-webpack-config-for-build-flat-dist