-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack4 bundle code introspection #234
Comments
Can you create a minimal repository that exposes the issue with install + error reproduction steps? Thanks. |
I'm experiencing the same issue. Downgrading to v1.0.2 and removing CommonChunks usage solved the issue for me. Though, later I decided to keep CommonChunks as it's a more important plugin than this. Would be great to get this working! |
@MatissJanis -- Can you create a minimal repository that exposes the issue with install + error reproduction steps? There are a lot of reasons a "no code sections found" can happen -- without something we can dive into, it's really just guesswork and not necessarily connected from one project to the next. Thanks! |
Hi @ryan-roemer I am getting this also. I am trying this on webpack4 so I appreciate it may not work anyway, but, here is a repo for you. Just clone & You can see the errors in the Log window in the top left: Strangely, I started this repo because on another project (carbon copy), I was getting similar errors without the ascii gui, but now I cannot replicate that, I get a blank shell: In this situation, scrolling up/down here will reveal strange characters: Which looks similar to: Let me know if you need anything else. |
@joepagan -- Thanks for the repo. I've made some tweaks to your scripts and configs. Some initial observations:
Here's my diff: diff --git a/package.json b/package.json
index d62592d..0a79d71 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "",
"scripts": {
- "start": "webpack-dashboard -- concurrently \"node_modules/.bin/webpack-dev-server --watch --config webpack.dev.js\"",
+ "start": "webpack-dashboard -- node_modules/.bin/webpack --watch --config webpack.dev.js",
"build": "concurrently \"node_modules/.bin/webpack --config webpack.prod.js\" \"gulp build\" && yarn run sizecheck-js && yarn run sizecheck-css",
"sizecheck-js": "node_modules/.bin/bundlesize -f \"./public/resources/javascript/*\" -s 20kB",
"sizecheck-css": "node_modules/.bin/bundlesize -f \"./public/resources/stylesheets/*\" -s 20kB"
diff --git a/webpack.common.js b/webpack.common.js
index 46cd2b1..71e416c 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -9,14 +9,14 @@ const DashboardPlugin = require('webpack-dashboard/plugin');
// const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
-
+
context: __dirname,
-
+
// stats.children false stops a bunch of spam appearing in the console when HMR is used, this is also set on devServer for the 'development' environment
stats: {
children: false
},
-
+
optimization: {
// SplitChunks replaces CommonsChunkPlugin in webpack4, this setup puts all node_modules dependencies in one commons chunk 'vendors'
splitChunks: {
@@ -42,6 +42,7 @@ module.exports = {
filename: "resources/javascript/[name].bundle.js",
chunkFilename: "resources/javascript/[name].chunk.js",
publicPath: "http://localhost:8080/",
+ pathinfo: true,
},
plugins: [
@@ -51,13 +52,13 @@ module.exports = {
// {
// from:'frontend/images',
// to:'public/resources/images'
- // }
- // ]),
+ // }
+ // ]),
// new SimpleProgressWebpackPlugin( { // Default options
// format: 'compact'
// } ),
-
+
new CleanWebpackPlugin([
__dirname + "/public/resources/javascript",
__dirname + "/public/resources/stylesheets"
@@ -73,9 +74,9 @@ module.exports = {
ignoreOrder: true
}),
- new UglifyJsPlugin({
- sourceMap: true
- }),
+ // new UglifyJsPlugin({
+ // sourceMap: true
+ // }),
new DashboardPlugin({
// port: 8080
@@ -134,7 +135,7 @@ module.exports = {
{
test: /\.(c|sc)ss$/,
use: ['css-hot-loader'].concat(
- ExtractTextPlugin.extract({
+ ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
@@ -143,7 +144,7 @@ module.exports = {
sourceMap: true,
minimize: true
}
- },
+ },
{
// TODO - check this loader may just load autoprefixer without options
loader: 'postcss-loader',
@@ -178,11 +179,11 @@ module.exports = {
})
)
},
-
+
/*
Images
*/
- {
+ {
test: /\.svg$/,
loader: 'svg-inline-loader' },
/*
diff --git a/webpack.dev.js b/webpack.dev.js
index 76fa344..4d15b37 100644
--- a/webpack.dev.js
+++ b/webpack.dev.js
@@ -3,11 +3,18 @@ const merge = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
-
+
context: __dirname,
// TODO - check which devtool is best
// https://webpack.js.org/configuration/devtool/
- devtool: "inline-source-map",
+ devtool: "source-map",
+
+ // webpack-dashboard needs unminified bundles.
+ // https://medium.com/webpack/webpack-4-mode-and-optimization-5423a6bc597a
+ optimization: {
+ minimize: false
+ },
+
// watch on production doesn't work in webpack4
watch: true,
// mode is now required in webpack4, has to either be 'development' or 'production' That produces: So we've got some entries, just not the specific files we're expecting. The first bundle looks like: ({
/***/ "./frontend/entries/app.entry.js":
/*!***************************************!*\
!*** ./frontend/entries/app.entry.js ***!
\***************************************/
// CODE and I've got to check if we should already handle bundles like this or not... |
Thanks for taking the time to look at my repo, appreciate y'all are busy! After a bit of testing found that it was indeed Notes on your changes:
And
It looks like you were setting It appears that I was wrong to be using I have added a new branch on the same repo here. After these changes, I do get further, and, I can see the gui now, but I do appear to be getting the errors you were also : Bonus question: |
Thanks for the update -- some other stuff has come up, so this is on my radar, even if I can't get to it immediately. To answer you bonus question:
so, |
No rush Ryan, appreciate the help. Thanks for the bonus answer 💃💃💃 |
Fixed in |
Thank you Ryan I'll try this soon! |
I had found this issue and tried the solution near the bottom of flipping
compress
to false but had no success.Steps to reproduce the problem
====================================================================
Please provide a gist of relevant files
webpack-dashboard -- webpack-dev-server --config config/webpack.config.js
====================================================================
More Details
echo $TERM
? xterm-256colorThe text was updated successfully, but these errors were encountered: