Comments (8)
hmm. thats a tough one. what are the two configs? is there one that you are interested in vs the other?
from webpack-dashboard.
Nope, it's two part of the same application and I really want the data of twice apps. (But both are simple webpack config)
What about this?
var config = require('./webpack.config.babel'); // The same file as above with two apps
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var compiler = webpack(config);
var server = new WebpackDevServer(compiler, {
// Install dashboard like in the README
});
server.listen(8080);
from webpack-dashboard.
Does that work for you?
from webpack-dashboard.
You might have to write your own handler function that merges the outputs and then calls setData on the dashboard.
from webpack-dashboard.
I'll try this later and let you know! Thanks
from webpack-dashboard.
I'm hijacking this issue for a bit, as I have a similar question (tell me if you prefer me to make a separate issue).
I have a setup which is based on the one here.
From package.json two script are run via npm run dev
: build:dev
, which builds (and watches) the server, and babel-node
, which runs the app with HMR.
There are two different webpack config files for these scripts: dev-server
and dev-client
respectively. I have succesfully added webpack-dashboard
to each of these scripts / config files, but the problem is this:
If I npm run build:dev
using webpack-dashboard
, I cannot see the client (HMR) output.
If I npm run dev
using webpack-dashboard
, I will see HMR output, but if there's an error in the server code (which is watched by nodemon
) it will output the error in the same console, which breaks webpack-dashboard
What I would like to do is to run two npm scripts (one watching the server build using nodemon
and another one running the server with HMR) and have both their output in webpack-dashboard
, is this possible?
Thanks in advance @kenwheeler et al!
Something like this (psuedo code):
nodemon --exec webpack-dashboard -- webpack --config webpack.config.dev-server.js && webpack-dashboard -- babel-node server/index.js`
from webpack-dashboard.
Chiming in here -- webpack currently allows (1) a config object (what we're all familiar with) and/or (2) an array of config objects.
@kenwheeler -- Perhaps we should consider some means of detection of other webpack configs from the same originating process id (aka the node webpack you're running at root on the multiple configs).
from webpack-dashboard.
webpack-dashboard@^2
should handle any webpack config using normal "add a plugin" means.
from webpack-dashboard.
Related Issues (20)
- why the border of table is 'qqq..' or 'xx' like the photo HOT 5
- after installing this plugin getting heap out of memory error HOT 2
- The module of the dashboard is always loading; HOT 6
- Getting heap overflow HOT 2
- How to get more readable names of modules? HOT 2
- Debugging the version skews problem HOT 2
- webpack-dashboard has undeclared dependency on chalk
- webpack v5 with express: compiler.apply is not a function HOT 1
- Webpack 5 warning message conflict HOT 2
- Webpack5 Support HOT 4
- Bug: "Success" status overwritten and stuck in "Compiling" for finished webpack build. HOT 2
- Love
- TS7016: Could not find a declaration file for module 'webpack-dashboard/plugin' HOT 8
- Deps: Update all deps.
- TypeError: Cannot read property 'type' of null HOT 6
- TypeError thrown when running in minimal mode HOT 2
- Run webpack dashboard from .js file. HOT 5
- Investigate increasing Maintainer Productivity with Pull Requests Environments
- I can not find the .d.ts file when I use webpack.config.ts HOT 1
- README.md
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-dashboard.