Comments (6)
are plugins supported using enhanced require?
no, and it's a webpack plugin...
from enhanced-require.
I think options.resolve
is also not supported...
It's only node.js style resolve...
from enhanced-require.
I think I'm perhaps misusing enhanced-require; I'm attempting to write an isomorphic web app where the initial html is rendered on the server for seo and faster load times.
I originally tried running the bundled src from the client side app using node's require however because the bundle doesn't export anything I had no way of retrieving the generated html string other than storing it on a global.
I then came across this project which I imagined I could use in a similar manner to requirejs in node whereby you'd require in the (non-bundled) src code however it seems enhanced-require doesn't have feature parity with webpack so I can't run the same code as on the client?
Is enhanced-require designed for this use-case or is it designed to be independent from webpack and just offers a, well, enhanced require for node?
from enhanced-require.
@richardscarrott, did you find a solution to this problem
I also ran into this issue
http://stackoverflow.com/questions/28275775/how-to-handle-window-object-on-nodejs-for-server-side-rendering-of-reactjs-appli
I am also trying to implement isomorphic react application and use webpack for client side build.
I am trying to use enhanced-require to handle jsx files on nodejs.
But, imports of libraries that use window object are failing. To overcome this problem I tried to use IgnorePlugin. It looks like webpack plugins doesn't work with enhanced-require
@sokra Do you have any suggestions for this usecase.
from enhanced-require.
@sokra Do you have any suggestions for this usecase.
Compile with webpack --target node
and run the compiled version...
from enhanced-require.
I see you have a good example of this here - https://github.com/webpack/react-webpack-server-side-example, thanks!
from enhanced-require.
Related Issues (14)
- Issue loading jade templates HOT 2
- Node fibers throw an error when used with enhanced require
- module.paths API is missing
- Updates required to get this up-to-date
- SyntaxError: Unexpected token ILLEGAL with java node_module HOT 1
- If this lib is CURRENTLY UNMAINTAINED, then what I should do to use webpack client side files in node.js? HOT 9
- The code for "startup your application" makes very little sense.
- Requiring relative to subtype HOT 4
- doesn't support emitFile HOT 4
- Define loaders in options HOT 2
- Mocha node testing with enhanced requires HOT 3
- Amd module with return doesn't get populated on node.js HOT 1
- Add a global var named __webpack_public_path__ in order to play nice with other loaders (file-loader) HOT 2
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 enhanced-require.