0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/packages/plugins/ui-theme/tools/webpack.config.js
Juan Picado 580319a53a
feat: ui improvements (#4071)
* feat: add download tarball indicator

* Update ActionBar.test.tsx

* fix: dark mode and readme css

* Create long-jars-collect.md

* Update long-jars-collect.md

* feat: improve install commands

* snapshots

* feat: hide deprecated versions option

* add testss

* feat: display deprecated versions

* add i18n

* fix e2e

* Update Readme.spec.tsx.snap
2023-10-14 19:19:52 +02:00

88 lines
1.7 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',
{
loader: 'css-loader',
options: {
importLoaders: 1,
modules: true,
},
},
],
},
{
test: /\.md$/,
use: 'raw-loader',
},
{
test: /\.tsx?$/,
use: 'babel-loader',
exclude: /node_modules/,
},
],
},
stats: {
children: false,
},
};