Comments (5)
Could you provide a minimal sample repository showing what you’re trying / would want to work?
from webpack-dashboard.
So basically this is what I am trying (Not my actual setup, just a bare minimum to show the steps)
//webpack.prod.ts
const DashboardPlugin = require('webpack-dashboard/plugin');
...
const prodConfig: webpack.Configuration = {
mode: 'production',
devtool: 'source-map',
entry: {
...
},
output: {
...
},
plugins: [
new DashboardPlugin(),
],
};
export default prodConfig;
and then I have this file that handles the build process(Not using a cli because the actual file does much more than shown here)
//buildWeb.ts
webpack(webpackConfig, (error, stats) => {
console.warn('Success\n', stats.toString());
});
And in my package.json, I execture my buildWeb.ts
by doing
"build-web": "npx ts-node src/scripts/buildWeb.ts",
This structure currently does not display anything inside the console.
one possible approach would be to be able to pass a callback to DashboardPlugin that will return something that I can use to construct the dashboard in the console window. I was initially thinking handler
option is exactly for that but I was unable to leverage that in any meaningful way.
from webpack-dashboard.
I actually just realized that adding the following to my buildWeb.ts
starts displaying the dashboard, but the dashboard just shows up empty and does not update the elements.
const Dashboard = require('webpack-dashboard/dashboard/index');
const dashboard = new Dashboard ();
// and then use the plugin with
new DashboardPlugin(dashboard.setData),
from webpack-dashboard.
I have an example running the dashboard from a TS config webpack config file for this PR: #341
Just checkout the repository and run yarn dev-ts
. You can look at what that command has in it as well as the example TS config file there for your reference.
If you're still hitting an error, can you please open up a minimal repository with what you'd expect (or like) to work as an example, so I can install + build and see the failure myself? This makes it much easier to debug rather than guessing as to your setup... Thanks!
from webpack-dashboard.
Oh, reading this more -- the dashboard currently relies on inter-process communication between a webpack process and the dashboard (really a websocket server that pretty prints stuff).
Maybe what you need is something like:
"build-web": "webpack-dashboard -- ts-node src/scripts/buildWeb.ts"
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
- 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.