Comments (8)
@psachs21 I've got a PR in progress (#42) that should give you a much better solution to this:
config.module
.rule('Javascript')
.use('hot')
.loader('react-hot-loader/webpack')
.before('babel');
from webpack-chain.
@eliperelman add this feature plz in docs. I found about this feature only here.
from webpack-chain.
@psachs21 I've got a PR in progress (#42) that should give you a much better solution to this:
config.module .rule('Javascript') .use('hot') .loader('react-hot-loader/webpack') .before('babel');
Thanks for this PR. But it look like nothing docs about this in README.md. Hope can update it in the docs.
from webpack-chain.
I can't say that I have the best answer to this problem right now. This wouldn't be the easiest to work around in Webpack either, as you need to know the right injection point in the array to insert the other loaders at.
My recommendation would probably be to restructure how you require these 2 together. Consider requiring development.js
config before base.js
:
// development.js
const config = new Config();
config.module
.rule('Javascript')
.test...
require('./base')(config);
module.exports = config.toConfig();
from webpack-chain.
Closing as resolved. If this solution doesn't work, please feel free to reopen and discuss. Thanks!
from webpack-chain.
@eliperelman That looks like a fantastic solution to my issue! Thanks. I'll keep an eye out for the release!
from webpack-chain.
@dimensi I've filed #114 for this. If someone is up for opening a PR for the docs that would be awesome, otherwise I'll take a look once the Neutrino 9 release is finished.
from webpack-chain.
Just wanted to note that this exists here now: https://neutrinojs.org/webpack-chain/#config-plugins-ordering-before
Because this issue was the top result when I searched :)
from webpack-chain.
Related Issues (20)
- the allowedHosts can't set 'all' HOT 1
- Missing strictModuleErrorHandling HOT 1
- Dependency Dashboard
- How to add polyfills? HOT 2
- When using vue as Multi Page Application, components in each entry point's internal directory cannot be used in common HOT 1
- Why tap functions return undefined? HOT 1
- Is there a configure for packaging wasm file? HOT 1
- One loader testing multiple file types
- RegExps in include.add, not working on Windows HOT 1
- How to specify filename for entry HOT 2
- config.output.chunkLoadingGlobal is not a function HOT 1
- How do I write this configuration ? HOT 2
- sideEffetcs method ts declare HOT 1
- This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag. HOT 1
- Externals config for specific entry HOT 1
- support asset modules with generator HOT 2
- How to add a plugin developed based on unplugin ? HOT 2
- How to modify Heap Memory Limit? HOT 1
- Does webpack-chain support webpack5 resolve.fallback? HOT 1
- This project is no longer maintained
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-chain.