我能够在本地构建我的项目。在 gitlab 运行器上,webpack 的进度上升到 100%,然后管道失败而没有错误。尚未达到 1 小时的超时。
=> 我怎样才能找到有关管道停止原因的更多详细信息?
该问题与包含 kepler.gl 和 redux 有关,它们有很多子依赖项。我希望 webpack 告诉我已经达到某个大小阈值或其他什么。
如果我删除 kepler.gl 和 redux,管道就可以工作。
相关问题:
gitlab 上的 CI/CD 无法使用 babel-loader 编译
我用于构建的命令:
webpack --mode=production --progress --config webpack.config.js
webpack.config.js
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: [
'react-app-polyfill/ie9',
'react-app-polyfill/stable',
`${__dirname}/src/index.jsx`,
],
output: {
path: `${__dirname}/dist`,
filename: 'bundle.js',
},
resolve: {
extensions: ['.js', '.jsx', '.css'],
},
module: {
rules: [
{
enforce: 'pre',
test: /\.(jsx|js)$/,
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
// eslint options (if necessary)
},
},
{
test: /\.(jsx|js)$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/react",
"@babel/flow"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
},
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
{
test: /\.(csv|gif|jpg|png|svg|pdf)$/,
use: 'url-loader',
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, // required for font-awesome
loader: 'url-loader',
},
{
test: /\.(ttf|eot|)(\?v=[0-9]\.[0-9]\.[0-9])?$/, // required for font-awesome
loader: 'url-loader',
},
],
},
plugins: [
new MiniCssExtractPlugin(),
new CopyWebpackPlugin({
patterns: [
{ from: 'src/index.html', to: '' },
{ from: 'doc/*.pptx' },
{ from: 'src/images', to: 'images' },
{ from: 'doc/*.html' },
{ from: 'doc/*.png' },
],
}),
],
};