1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

feat(app): introduce react configurations [EE-1809] (#5953)

This commit is contained in:
Chaim Lev-Ari 2021-11-03 12:41:59 +02:00 committed by GitHub
parent b285219a58
commit 85a6a80722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 8974 additions and 599 deletions

View file

@ -7,6 +7,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const pkg = require('../package.json');
const projectRoot = path.resolve(__dirname, '..');
@ -37,7 +38,7 @@ module.exports = {
],
},
{
test: /\.js$/,
test: /\.(js|ts)(x)?$/,
exclude: /node_modules/,
use: ['babel-loader', 'auto-ngtemplate-loader'],
},
@ -61,7 +62,21 @@ module.exports = {
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { importLoaders: 1 } }, 'postcss-loader'],
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
importLoaders: 1,
modules: {
localIdentName: '[path][name]__[local]',
auto: true,
exportLocalsConvention: 'camelCaseOnly',
},
},
},
'postcss-loader',
],
},
],
},
@ -103,7 +118,6 @@ module.exports = {
new MiniCssExtractPlugin({
filename: '[name].[hash].css',
chunkFilename: '[name].[id].css',
sourceMap: true,
}),
new CleanWebpackPlugin(['dist/public']),
new IgnorePlugin(/^\.\/locale$/, /moment$/),
@ -136,5 +150,11 @@ module.exports = {
Portainer: path.resolve(projectRoot, 'app/portainer'),
'@': path.resolve(projectRoot, 'app'),
},
extensions: ['.js', '.ts', '.tsx'],
plugins: [
new TsconfigPathsPlugin({
extensions: ['.js', '.ts', '.tsx'],
}),
],
},
};