-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
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
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
Metadata
Metadata
Assignees
Labels
No labels