Comments (3)
alias is a core webpack feature, it only kicks if there's an exact match.
You can achieve what you describe via one of the context modification plugins - http://webpack.github.io/docs/list-of-plugins.html#config
However, I'd suggest that using relative file paths in standard CommonJS style is preferrable.
from ultimate-hot-reloading-example.
Thanks glenjamin, actually it works if you use the alias in client side,but not in the server side.
--- components/index.js
following code will work
var App = require('components/App');
from ultimate-hot-reloading-example.
Oh? I stand corrected!
The server side in this demo doesn't use webpack - so any webpack settings only kick in on the client.
If you want aliases on the server you'd need to use a second bundle and require() it into the node app.
from ultimate-hot-reloading-example.
Related Issues (20)
- Has any example about many components and pages? HOT 2
- PostCSS Not Being Used? HOT 3
- server reload can not work on windows HOT 6
- Mysterious babel error HOT 6
- Flash of style on start up HOT 6
- Express routes not reloading HOT 7
- Working on Koa2? HOT 6
- Is this deprecated? HOT 2
- Issue when converting to ES6 Module syntax HOT 5
- Sass live reload? HOT 1
- Mongoose bug: schema already defined HOT 3
- Consider isomorphic-webpack
- This isn't hot reloading. This is going to the browser and refreshing HOT 1
- How we can use this trick with sass files? HOT 1
- Example with Webpack 2.X
- Integrate VSCode debugging for both client and server side
- npm run start fails on Debian 9
- Figure out exactly what file has been changed instead of clear all cache HOT 2
- Cannot "hot-reload" for the server side/express related stuffs
- Webpack 4?
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 ultimate-hot-reloading-example.