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
  • !476

Made webpack respect NODE_PATH environment variable

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/jimmyhmiller/master into master Aug 22, 2016
  • Overview 15
  • Commits 3
  • Pipelines 0
  • Changes 3

Created by: jimmyhmiller

This addresses #253 (closed). Nothing should change by default, but you are able to set your NODE_PATH environment variable if you want absolute path imports.

Test Plan

I tested this by changing import App from './App'; to import App from 'App'; in index.js. Without setting NODE_PATH run and build will now fail because it can't find the module. After setting the the NODE_PATH to `./template/src' the project both builds and runs.

I also generated a new project, which you can find here that uses this absolute import. I did the equivalent change in the tests directory and the tests pass.

Let me know if you have any questions or any suggestions.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jimmyhmiller/master