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
  • Issues
  • #3961
Closed
Open
Issue created Feb 02, 2018 by Administrator@rootContributor

dotenv-expand breaking build when "$" is used

Created by: jdcrensh

We use variables that include $ within the strings, which we don't want to be expanded. Escaping with \$ works fine when it occurs at the start of the string, but not anywhere else within the string.

Example:

REACT_APP_MYVAR=\$bar.baz <- works as expected, value is "$bar.baz" REACT_APP_MYVAR=foo\$bar.baz <- I'd expect "foo$bar.baz" but I get "foo\.baz"

I also tried working around the problem, like so:

BAR=\$bar
REACT_APP_MYVAR=foo$BAR.baz

But it gave the same result of "foo\.baz"

Assignee
Assign to
Time tracking