Cannot use "resolveLoader" to resolve babel-loader presets and plugin
See original GitHub issueI’m submitting a bug report
Webpack Version: 2.6.1
Babel Core Version: 6.25.0
Babel Loader Version: 7.0.0
Please tell us about your environment: OSX 10.x
Current behavior: the “node_modules” folder is out of the project directory, but I cannot resolve plugin at correct path by using the webpack config “resolveLoader”, got error " Unknown plugin “transform-react-jsx” specified in “base” at 0, attempted to resolve relative to…"
webpack config
resolveLoader : { path.resolve( __dirname, ‘…/node_modules’ ) }
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
node.js - Can't resolve 'babel-loader' - Stack Overflow
Webpack has been initialised using a configuration object that does not match the API schema. - configuration.resolveLoader has an unknown ...
Read more >Module not found: Can't resolve 'babel-loader' | bobbyhadz
To solve the error Module not found: Error: Can't resolve 'babel-loader', make sure to install the `babel-loader` package by opening your terminal in...
Read more >webpack-chain: Neutrino configuration API
resolveLoader is identical to neutrino.config.resolve with the following ... You cannot use both .before() and .after() on the same resolve plugin.
Read more >@gem-mine/webpack-chain - npm
Start using @gem-mine/webpack-chain in your project by running `npm i ... resolveLoader is identical to config.resolve with the following ...
Read more >Can't resolve package error. : r/webpack - Reddit
const HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = (env = {}, argv = {}) => ({ module: { rules: [ { test: /\.js$/, use: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mingxian a similar problem has occurred to a few people. It seems the link that @dbethel provided is no longer working (at least not for me).
I’ve seen a solution similar to this when dealing with packages that are external to your project directory. This needs to be specified in your webpack.config.js, perhaps this will help:
I’m triaging old issues on babel-loader. Since this has been inactive for ages, I’m going to close it. Feel free to re-open if there’s still something to discuss, but I’m assuming at this point it’s been too long to address in a useful way.
Babel 7 should also behave better around this stuff, so hopefully manually calling
require.resolve
will be less common