mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
18216e54d4
* fix: ui and docker nightly image some errors due pnpm.8 migration * Update ci.yml * ci
79 lines
1.5 KiB
JavaScript
79 lines
1.5 KiB
JavaScript
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
|
|
const env = require('../config/env');
|
|
|
|
module.exports = {
|
|
entry: `${env.SRC_ROOT}/index.tsx`,
|
|
|
|
output: {
|
|
path: `${env.APP_ROOT}/static/`,
|
|
filename: '[name].[fullhash].js',
|
|
publicPath: '-/static/',
|
|
},
|
|
|
|
resolve: {
|
|
extensions: ['.wasm', '.mjs', '.js', '.jsx', '.ts', '.tsx'],
|
|
modules: ['node_modules'],
|
|
alias: {
|
|
'verdaccio-ui/components': `${env.SRC_ROOT}/components`,
|
|
'verdaccio-ui/utils': `${env.SRC_ROOT}/utils`,
|
|
'verdaccio-ui/providers': `${env.SRC_ROOT}/providers`,
|
|
},
|
|
},
|
|
|
|
plugins: [
|
|
new StyleLintPlugin({
|
|
files: ['src/**/styles.ts'],
|
|
failOnError: false,
|
|
emitErrors: true,
|
|
}),
|
|
],
|
|
|
|
optimization: {
|
|
runtimeChunk: {
|
|
name: 'runtime',
|
|
},
|
|
splitChunks: {
|
|
chunks: 'all',
|
|
cacheGroups: {
|
|
commons: {
|
|
test: /[\\/]node_modules[\\/]/,
|
|
name: 'vendors',
|
|
chunks: 'initial',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.m?js/,
|
|
resolve: {
|
|
fullySpecified: false,
|
|
},
|
|
},
|
|
{
|
|
test: /\.(jpe?g|png|gif|svg)$/,
|
|
type: 'asset/inline',
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ['style-loader', 'css-loader'],
|
|
},
|
|
{
|
|
test: /\.md$/,
|
|
use: 'raw-loader',
|
|
},
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'babel-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
|
|
stats: {
|
|
children: false,
|
|
},
|
|
};
|