Comcast / Comcast/patternlab-edition-node-webpack

Webpack stuck at 'wait until bundle finished: /'

Đang mở
#45 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
128
Fork
92
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## I found the following issue:
When I try to start patternlab with patternlab: serve, my webpack is stuck at these two messages:
```
i 「wdm」: wait until bundle finished: /
i 「wdm」: wait until bundle finished: /sw.js
```

This is my webpack.app.js
```javascript
const webpack = require("webpack");
const {
getIfUtils
} = require("webpack-config-utils");
const {
resolve
} = require("path");
const globby = require("globby");
const plConfig = require("../../patternlab-config.json");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

module.exports = env => {
const {
ifProduction,
ifDevelopment
} = getIfUtils(env);
const appNamespace = plConfig.app.namespace ?
`$ns:${plConfig.app.namespace};` :
``;
const app = {
entry: {
"css/styles": globby.sync(
[
resolve(`${plConfig.paths.source.css}scss/*.scss`),
], {
gitignore: true
}
)
},
optimization: {
splitChunks: {
cacheGroups: {
vendor: {
test: /node_modules/,
chunks: "initial",
name: "css/sample-project-vendor",
priority: 10,
enforce: true
}
}
}
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css",
disable: ifDevelopment()
}),
new webpack.DefinePlugin({
NAMESPACE: appNamespace
})
],
module: {
rules: [{
test: /\.scss$/,
use: [{
loader: ifDevelopment(
"style-loader",
MiniCssExtractPlugin.loader
)

},
{
loader: "css-loader"
},
{
loader: "postcss-loader",
options: {
sourceMap: ifDevelopment(),
plugins: loader => [
// eslint-disable-line no-unused-vars
require("autoprefixer"),
require("postcss-flexbugs-fixes")
]
}
},
{
loader: "sass-loader",
options: {
sourceMap: ifDevelopment(),
sassOptions: {
precision: 3,
outputStyle: ifProduction(
"compressed",
"expanded"
),
prependData: appNamespace
}
}
},
{
loader: "import-glob-loader"
}
]
},
{
test: /\.(woff|woff2|ttf|otf)$/,
loader: 'file-loader',
include: [/fonts/],

options: {
name: '[hash].[ext]',
outputPath: 'css/',
publicPath: url => '../css/' + url
}
},
{
test: /\.(png|jp(e*)g|svg)$/,
use: [{
loader: 'url-loader',
options: {
limit: 8000, // Convert images < 8kb to base64 strings
name: 'images/[hash]-[name].[ext]'
}
}]
}
]
}
};
return app;
};

```

The 'patternlab:build' works fine

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with webpack.app.js and reproduce the issue using `patternlab: serve`, then compare its behavior with the working `patternlab:build` task. Trace why webpack remains at “wait until bundle finished” for `/` and `/sw.js`; done means the serve task completes bundling and starts normally.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, nodejs, webpack
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.