mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Merge pull request #1192 from dmitrylyzo/use-root-config
Use root build config
This commit is contained in:
commit
b0b3f77525
@ -1,3 +0,0 @@
|
||||
{
|
||||
"presets": ["@babel/preset-env"]
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
const packageConfig = require('./package.json');
|
||||
const postcssPresetEnv = require('postcss-preset-env');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const cssnano = require('cssnano');
|
||||
|
||||
const config = () => ({
|
||||
plugins: [
|
||||
postcssPresetEnv(),
|
||||
postcssPresetEnv({browsers: packageConfig.browserslist}),
|
||||
autoprefixer(),
|
||||
cssnano()
|
||||
]
|
||||
|
@ -1,6 +1,8 @@
|
||||
const path = require('path');
|
||||
const common = require('./webpack.common');
|
||||
const merge = require('webpack-merge');
|
||||
const packageConfig = require('./package.json');
|
||||
const postcssConfig = require('./postcss.config.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
@ -15,11 +17,23 @@ module.exports = merge(common, {
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules[\\/](?!query-string|split-on-first|strict-uri-encode)/,
|
||||
loader: 'babel-loader'
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: packageConfig.babel.presets
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: ['style-loader', 'css-loader', 'postcss-loader']
|
||||
use: [
|
||||
'style-loader',
|
||||
'css-loader',
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: postcssConfig()
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|gif)$/i,
|
||||
|
@ -1,5 +1,7 @@
|
||||
const common = require('./webpack.common');
|
||||
const merge = require('webpack-merge');
|
||||
const packageConfig = require('./package.json');
|
||||
const postcssConfig = require('./postcss.config.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
@ -8,11 +10,23 @@ module.exports = merge(common, {
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules[\\/](?!query-string|split-on-first|strict-uri-encode)/,
|
||||
loader: 'babel-loader'
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: packageConfig.babel.presets
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: ['style-loader', 'css-loader', 'postcss-loader']
|
||||
use: [
|
||||
'style-loader',
|
||||
'css-loader',
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: postcssConfig()
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|gif)$/i,
|
||||
|
Loading…
Reference in New Issue
Block a user