I have a project on react using redux. when I write in the file of my project import redux from 'redux'; This is imported from the ./node_modules/redux/lib/index.js directory because the main file itself is defined in the configurations (package.json) redux itself: "lib / index.js". those. imported READY compiled redux.
what I want? I want to take redux sources, i.e. import not from lib / index.js, but from src / index.js. I change the main property in package.json
If you now look at my webpack.config.js config, then it looks like this:
... loaders: [{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel', query: { plugins: ['transform-runtime'], presets: ['es2015', 'stage-0', 'react'] } } ... those. I explicitly state that you do not need to take files to compile from node_modules. The problem is that I do not know how to register an exception for my redux, so that it compiles. I tried to add the property below:
include: /node_modules\/redux/, but so webpack swears. or just wanted to compile specifying (here is the old lib / index.js setting):
include: __dirname + '/app', but I didn’t work with this team either. help with configuring config