Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

removing the create-react-app Source directories config jail #3

Open
vladp opened this issue Apr 13, 2018 · 0 comments
Open

removing the create-react-app Source directories config jail #3

vladp opened this issue Apr 13, 2018 · 0 comments

Comments

@vladp
Copy link

vladp commented Apr 13, 2018

Thank you for putting together the work around.
I am having, still some difficulties, getting my project out of this CRA source directories jail.
Wondering if you could take a look and see if there is something easy to fix.

My initial problem is due to not being able to use symlinks under src to share code with my react-native project
facebook/create-react-app#4295

Here is the override file I am trying to use

config.overrides.dev.js


const path = require('path');


const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const paths = require('./paths');



module.exports = function(config) {
  config.resolve.symlinks= true;
  
  // my console.log do not get printed  
  
// tried to modify the parameters to the module scope plugin -- does not work
  let myPath='C:\\Users\\v\\home\\devel\\mine\\commonlibrary_src';
  let myModuleScopePlugin= new ModuleScopePlugin(paths.appSrc,
                                                 [paths.appPackageJson,
                                                 myPath]);
  
  config.resolve.Xplugins.unshift(myModuleScopePlugin);
 //tried to remove the plugin all together -- does not work, either
  //config.resolve.plugins.splice[0,0];
}

package.json


{
    "name": "ua1b",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
        "create-react-class": "15.6.3",
        "proxyquire": "^2.0.1",
        "react": "^16.3.1",
        "react-dom": "^16.3.1",
        "react-native-deprecated-custom-components": "github:facebookarchive/react-native-custom-components",
        "react-native-material-kit": "github:xinthink/react-native-material-kit#master",
        "react-native-section-list-get-item-layout": "2.2.1",
        "react-native-vector-icons": "^4.5.0",
        "react-native-web": "^0.5.4",
        "react-scripts": "1.1.4",
        "rewire": "^4.0.0",
        "tree-model": "^1.0.6"
    },
    "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test --env=jsdom",
        "eject": "react-scripts eject",
        "ostart": "node scripts/customized-config start",
        "obuild": "node scripts/customized-config build",
        "otest": "node scripts/customized-config test --env=jsdom"
    },
    "devDependencies": {
        "babel-plugin-react-native-web": "^0.5.4"
    }
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant