Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • !12667

feat: alias prefixed by at sign

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/fredericrous/feat/alias-atsign into main 2 years ago
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: fredericrous

alias prefixed with @/ instead of importing services/someService, with this PR we would import from @/services/someService

illustrate idea at https://github.com/facebook/create-react-app/discussions/12666

Compare
  • main (base)

and
  • latest version
    da0d3b4c
    1 commit, 2 years ago

2 files
+ 2
- 2

    Preferences

    File browser
    Compare changes
packages/re‎act-scripts‎
con‎fig‎
webpack.‎config.js‎ +1 -1
script‎s/utils‎
createJes‎tConfig.js‎ +1 -1
packages/react-scripts/config/webpack.config.js
+ 1
- 1
  • View file @ da0d3b4c


@@ -328,7 +328,7 @@ module.exports = function (webpackEnv) {
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
}),
...(modules.webpackAliases || {}),
...(modules.webpackAliases?.map((alias) => `@/${alias}`) || {}),
},
plugins: [
// Prevents users from importing files from outside of src/ (or node_modules/).
packages/react-scripts/scripts/utils/createJestConfig.js
+ 1
- 1
  • View file @ da0d3b4c


@@ -56,7 +56,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
moduleNameMapper: {
'^react-native$': 'react-native-web',
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
...(modules.jestAliases || {}),
...(modules.jestAliases?.map((alias) => `@/${alias}`) || {}),
},
moduleFileExtensions: [...paths.moduleFileExtensions, 'node'].filter(
ext => !ext.includes('mjs')
0 Assignees
None
Assign to
0 Reviewers
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
Lock merge request
Unlocked
1
1 participant
Administrator
Reference:
Source branch: github/fork/fredericrous/feat/alias-atsign

Menu

Explore Projects Groups Snippets