mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
hop
This commit is contained in:
parent
d806ddd7ab
commit
08755fbae2
1
.browserslistrc
Normal file
1
.browserslistrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
defaults
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -58,3 +58,10 @@ yarn-debug.log
|
|||||||
# Ignore Docker option files
|
# Ignore Docker option files
|
||||||
docker-compose.override.yml
|
docker-compose.override.yml
|
||||||
|
|
||||||
|
|
||||||
|
/public/packs
|
||||||
|
/public/packs-test
|
||||||
|
/node_modules
|
||||||
|
/yarn-error.log
|
||||||
|
yarn-debug.log*
|
||||||
|
.yarn-integrity
|
||||||
|
@ -1 +1 @@
|
|||||||
2.6.0
|
2.6.4
|
||||||
|
@ -72,16 +72,16 @@ class Account < ApplicationRecord
|
|||||||
validates :username, presence: true
|
validates :username, presence: true
|
||||||
|
|
||||||
# Remote user validations
|
# Remote user validations
|
||||||
validates :username, uniqueness: { scope: :domain, case_sensitive: true }, if: -> { !local? && will_save_change_to_username? }
|
validates :username, uniqueness: {scope: :domain, case_sensitive: true}, if: -> { !local? && will_save_change_to_username? }
|
||||||
validates :username, format: { with: /\A#{USERNAME_RE}\z/i }, if: -> { !local? && will_save_change_to_username? }
|
validates :username, format: {with: /\A#{USERNAME_RE}\z/i}, if: -> { !local? && will_save_change_to_username? }
|
||||||
|
|
||||||
# Local user validations
|
# Local user validations
|
||||||
validates :username, format: { with: /\A[a-z0-9_]+\z/i }, length: { maximum: 30 }, if: -> { local? && will_save_change_to_username? && actor_type != 'Application' }
|
validates :username, format: {with: /\A[a-z0-9_]+\z/i}, length: {maximum: 30}, if: -> { local? && will_save_change_to_username? && actor_type != 'Application' }
|
||||||
validates_with UniqueUsernameValidator, if: -> { local? && will_save_change_to_username? }
|
validates_with UniqueUsernameValidator, if: -> { local? && will_save_change_to_username? }
|
||||||
validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? }
|
validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? }
|
||||||
validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? }
|
validates :display_name, length: {maximum: 30}, if: -> { local? && will_save_change_to_display_name? }
|
||||||
validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
|
validates :note, note_length: {maximum: 500}, if: -> { local? && will_save_change_to_note? }
|
||||||
validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
|
validates :fields, length: {maximum: 4}, if: -> { local? && will_save_change_to_fields? }
|
||||||
|
|
||||||
scope :remote, -> { where.not(domain: nil) }
|
scope :remote, -> { where.not(domain: nil) }
|
||||||
scope :local, -> { where(domain: nil) }
|
scope :local, -> { where(domain: nil) }
|
||||||
@ -100,7 +100,7 @@ class Account < ApplicationRecord
|
|||||||
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }
|
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }
|
||||||
scope :searchable, -> { without_suspended.where(moved_to_account_id: nil) }
|
scope :searchable, -> { without_suspended.where(moved_to_account_id: nil) }
|
||||||
scope :discoverable, -> { searchable.without_silenced.where(discoverable: true).left_outer_joins(:account_stat) }
|
scope :discoverable, -> { searchable.without_silenced.where(discoverable: true).left_outer_joins(:account_stat) }
|
||||||
scope :tagged_with, ->(tag) { joins(:accounts_tags).where(accounts_tags: { tag_id: tag }) }
|
scope :tagged_with, ->(tag) { joins(:accounts_tags).where(accounts_tags: {tag_id: tag}) }
|
||||||
scope :by_recent_status, -> { order(Arel.sql('(case when account_stats.last_status_at is null then 1 else 0 end) asc, account_stats.last_status_at desc, accounts.id desc')) }
|
scope :by_recent_status, -> { order(Arel.sql('(case when account_stats.last_status_at is null then 1 else 0 end) asc, account_stats.last_status_at desc, accounts.id desc')) }
|
||||||
scope :popular, -> { order('account_stats.followers_count desc') }
|
scope :popular, -> { order('account_stats.followers_count desc') }
|
||||||
scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches('%.' + domain))) }
|
scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches('%.' + domain))) }
|
||||||
@ -297,7 +297,7 @@ class Account < ApplicationRecord
|
|||||||
tmp = [] if tmp.is_a?(Hash)
|
tmp = [] if tmp.is_a?(Hash)
|
||||||
|
|
||||||
(DEFAULT_FIELDS_SIZE - tmp.size).times do
|
(DEFAULT_FIELDS_SIZE - tmp.size).times do
|
||||||
tmp << { name: '', value: '' }
|
tmp << {name: '', value: ''}
|
||||||
end
|
end
|
||||||
|
|
||||||
self.fields = tmp
|
self.fields = tmp
|
||||||
@ -373,7 +373,7 @@ class Account < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_h
|
def to_h
|
||||||
{ name: @name, value: @value, verified_at: @verified_at }
|
{name: @name, value: @value, verified_at: @verified_at}
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
%td
|
%td
|
||||||
= number_to_human account.statuses_count, strip_insignificant_zeros: true
|
= number_to_human account.statuses_count, strip_insignificant_zeros: true
|
||||||
%td
|
%td
|
||||||
= admin_account_link_to(account)
|
toudou
|
||||||
%td
|
%td
|
||||||
= admin_account_link_to(account)
|
toudou
|
||||||
|
137
babel.config.js
137
babel.config.js
@ -1,71 +1,72 @@
|
|||||||
module.exports = (api) => {
|
module.exports = function(api) {
|
||||||
const env = api.env();
|
var validEnv = ['development', 'test', 'production']
|
||||||
|
var currentEnv = api.env()
|
||||||
|
var isDevelopmentEnv = api.env('development')
|
||||||
|
var isProductionEnv = api.env('production')
|
||||||
|
var isTestEnv = api.env('test')
|
||||||
|
|
||||||
const envOptions = {
|
if (!validEnv.includes(currentEnv)) {
|
||||||
debug: false,
|
throw new Error(
|
||||||
loose: true,
|
'Please specify a valid `NODE_ENV` or ' +
|
||||||
modules: false,
|
'`BABEL_ENV` environment variables. Valid values are "development", ' +
|
||||||
};
|
'"test", and "production". Instead, received: ' +
|
||||||
|
JSON.stringify(currentEnv) +
|
||||||
const config = {
|
'.'
|
||||||
presets: [
|
)
|
||||||
'@babel/react',
|
|
||||||
['@babel/env', envOptions],
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
'@babel/syntax-dynamic-import',
|
|
||||||
['@babel/proposal-object-rest-spread', { useBuiltIns: true }],
|
|
||||||
['@babel/proposal-decorators', { legacy: true }],
|
|
||||||
'@babel/proposal-class-properties',
|
|
||||||
['react-intl', { messagesDir: './build/messages' }],
|
|
||||||
'preval',
|
|
||||||
],
|
|
||||||
overrides: [{
|
|
||||||
test: /tesseract\.js/,
|
|
||||||
presets: [
|
|
||||||
['@babel/env', { ...envOptions, modules: 'commonjs' }],
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (env) {
|
|
||||||
case 'production':
|
|
||||||
envOptions.debug = false;
|
|
||||||
config.plugins.push(...[
|
|
||||||
'lodash',
|
|
||||||
[
|
|
||||||
'transform-react-remove-prop-types',
|
|
||||||
{
|
|
||||||
mode: 'remove',
|
|
||||||
removeImport: true,
|
|
||||||
additionalLibraries: [
|
|
||||||
'react-immutable-proptypes',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'@babel/transform-react-inline-elements',
|
|
||||||
[
|
|
||||||
'@babel/transform-runtime',
|
|
||||||
{
|
|
||||||
helpers: true,
|
|
||||||
regenerator: false,
|
|
||||||
useESModules: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
break;
|
|
||||||
case 'development':
|
|
||||||
envOptions.debug = true;
|
|
||||||
config.plugins.push(...[
|
|
||||||
'@babel/transform-react-jsx-source',
|
|
||||||
'@babel/transform-react-jsx-self',
|
|
||||||
]);
|
|
||||||
break;
|
|
||||||
case 'test':
|
|
||||||
envOptions.modules = 'commonjs';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return {
|
||||||
};
|
presets: [
|
||||||
|
isTestEnv && [
|
||||||
|
require('@babel/preset-env').default,
|
||||||
|
{
|
||||||
|
targets: {
|
||||||
|
node: 'current'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
(isProductionEnv || isDevelopmentEnv) && [
|
||||||
|
require('@babel/preset-env').default,
|
||||||
|
{
|
||||||
|
forceAllTransforms: true,
|
||||||
|
useBuiltIns: 'entry',
|
||||||
|
corejs: 3,
|
||||||
|
modules: false,
|
||||||
|
exclude: ['transform-typeof-symbol']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
].filter(Boolean),
|
||||||
|
plugins: [
|
||||||
|
require('babel-plugin-macros'),
|
||||||
|
require('@babel/plugin-syntax-dynamic-import').default,
|
||||||
|
isTestEnv && require('babel-plugin-dynamic-import-node'),
|
||||||
|
require('@babel/plugin-transform-destructuring').default,
|
||||||
|
[
|
||||||
|
require('@babel/plugin-proposal-class-properties').default,
|
||||||
|
{
|
||||||
|
loose: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
require('@babel/plugin-proposal-object-rest-spread').default,
|
||||||
|
{
|
||||||
|
useBuiltIns: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
require('@babel/plugin-transform-runtime').default,
|
||||||
|
{
|
||||||
|
helpers: false,
|
||||||
|
regenerator: true,
|
||||||
|
corejs: false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
require('@babel/plugin-transform-regenerator').default,
|
||||||
|
{
|
||||||
|
async: false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
].filter(Boolean)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,61 +1,5 @@
|
|||||||
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
||||||
|
|
||||||
const merge = require('webpack-merge');
|
const environment = require('./environment')
|
||||||
const sharedConfig = require('./shared');
|
|
||||||
const { settings, output } = require('./configuration');
|
|
||||||
|
|
||||||
const watchOptions = {};
|
module.exports = environment.toWebpackConfig()
|
||||||
|
|
||||||
if (process.env.VAGRANT) {
|
|
||||||
// If we are in Vagrant, we can't rely on inotify to update us with changed
|
|
||||||
// files, so we must poll instead. Here, we poll every second to see if
|
|
||||||
// anything has changed.
|
|
||||||
watchOptions.poll = 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = merge(sharedConfig, {
|
|
||||||
mode: 'development',
|
|
||||||
cache: true,
|
|
||||||
devtool: 'cheap-module-eval-source-map',
|
|
||||||
|
|
||||||
stats: {
|
|
||||||
errorDetails: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
output: {
|
|
||||||
pathinfo: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
devServer: {
|
|
||||||
clientLogLevel: 'none',
|
|
||||||
compress: settings.dev_server.compress,
|
|
||||||
quiet: settings.dev_server.quiet,
|
|
||||||
disableHostCheck: settings.dev_server.disable_host_check,
|
|
||||||
host: settings.dev_server.host,
|
|
||||||
port: settings.dev_server.port,
|
|
||||||
https: settings.dev_server.https,
|
|
||||||
hot: settings.dev_server.hmr,
|
|
||||||
contentBase: output.path,
|
|
||||||
inline: settings.dev_server.inline,
|
|
||||||
useLocalIp: settings.dev_server.use_local_ip,
|
|
||||||
public: settings.dev_server.public,
|
|
||||||
publicPath: output.publicPath,
|
|
||||||
historyApiFallback: {
|
|
||||||
disableDotRule: true,
|
|
||||||
},
|
|
||||||
headers: settings.dev_server.headers,
|
|
||||||
overlay: settings.dev_server.overlay,
|
|
||||||
stats: {
|
|
||||||
entrypoints: false,
|
|
||||||
errorDetails: false,
|
|
||||||
modules: false,
|
|
||||||
moduleTrace: false,
|
|
||||||
},
|
|
||||||
watchOptions: Object.assign(
|
|
||||||
{},
|
|
||||||
settings.dev_server.watch_options,
|
|
||||||
watchOptions
|
|
||||||
),
|
|
||||||
writeToDisk: filePath => /ocr/.test(filePath),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
3
config/webpack/environment.js
Normal file
3
config/webpack/environment.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const { environment } = require('@rails/webpacker')
|
||||||
|
|
||||||
|
module.exports = environment
|
@ -1,98 +1,5 @@
|
|||||||
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
|
||||||
|
|
||||||
const path = require('path');
|
const environment = require('./environment')
|
||||||
const { URL } = require('url');
|
|
||||||
const merge = require('webpack-merge');
|
|
||||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
||||||
const OfflinePlugin = require('offline-plugin');
|
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin');
|
|
||||||
const { output } = require('./configuration');
|
|
||||||
const sharedConfig = require('./shared');
|
|
||||||
|
|
||||||
let attachmentHost;
|
module.exports = environment.toWebpackConfig()
|
||||||
|
|
||||||
if (process.env.S3_ENABLED === 'true') {
|
|
||||||
if (process.env.S3_ALIAS_HOST || process.env.S3_CLOUDFRONT_HOST) {
|
|
||||||
attachmentHost = process.env.S3_ALIAS_HOST || process.env.S3_CLOUDFRONT_HOST;
|
|
||||||
} else {
|
|
||||||
attachmentHost = process.env.S3_HOSTNAME || `s3-${process.env.S3_REGION || 'us-east-1'}.amazonaws.com`;
|
|
||||||
}
|
|
||||||
} else if (process.env.SWIFT_ENABLED === 'true') {
|
|
||||||
const { host } = new URL(process.env.SWIFT_OBJECT_URL);
|
|
||||||
attachmentHost = host;
|
|
||||||
} else {
|
|
||||||
attachmentHost = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = merge(sharedConfig, {
|
|
||||||
mode: 'production',
|
|
||||||
devtool: 'source-map',
|
|
||||||
stats: 'normal',
|
|
||||||
bail: true,
|
|
||||||
optimization: {
|
|
||||||
minimize: true,
|
|
||||||
minimizer: [
|
|
||||||
new TerserPlugin({
|
|
||||||
cache: true,
|
|
||||||
parallel: true,
|
|
||||||
sourceMap: true,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
plugins: [
|
|
||||||
new CompressionPlugin({
|
|
||||||
filename: '[path].gz[query]',
|
|
||||||
cache: true,
|
|
||||||
test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/,
|
|
||||||
}),
|
|
||||||
new BundleAnalyzerPlugin({ // generates report.html
|
|
||||||
analyzerMode: 'static',
|
|
||||||
openAnalyzer: false,
|
|
||||||
logLevel: 'silent', // do not bother Webpacker, who runs with --json and parses stdout
|
|
||||||
}),
|
|
||||||
new OfflinePlugin({
|
|
||||||
publicPath: output.publicPath, // sw.js must be served from the root to avoid scope issues
|
|
||||||
safeToUseOptionalCaches: true,
|
|
||||||
caches: {
|
|
||||||
main: [':rest:'],
|
|
||||||
additional: [':externals:'],
|
|
||||||
optional: [
|
|
||||||
'**/locale_*.js', // don't fetch every locale; the user only needs one
|
|
||||||
'**/*_polyfills-*.js', // the user may not need polyfills
|
|
||||||
'**/*.woff2', // the user may have system-fonts enabled
|
|
||||||
// images/audio can be cached on-demand
|
|
||||||
'**/*.png',
|
|
||||||
'**/*.jpg',
|
|
||||||
'**/*.jpeg',
|
|
||||||
'**/*.svg',
|
|
||||||
'**/*.mp3',
|
|
||||||
'**/*.ogg',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
externals: [
|
|
||||||
'/emoji/1f602.svg', // used for emoji picker dropdown
|
|
||||||
'/emoji/sheet_10.png', // used in emoji-mart
|
|
||||||
],
|
|
||||||
excludes: [
|
|
||||||
'**/*.gz',
|
|
||||||
'**/*.map',
|
|
||||||
'stats.json',
|
|
||||||
'report.html',
|
|
||||||
// any browser that supports ServiceWorker will support woff2
|
|
||||||
'**/*.eot',
|
|
||||||
'**/*.ttf',
|
|
||||||
'**/*-webfont-*.svg',
|
|
||||||
'**/*.woff',
|
|
||||||
],
|
|
||||||
ServiceWorker: {
|
|
||||||
entry: `imports-loader?ATTACHMENT_HOST=>${encodeURIComponent(JSON.stringify(attachmentHost))}!${encodeURI(path.join(__dirname, '../../app/javascript/mastodon/service_worker/entry.js'))}`,
|
|
||||||
cacheName: 'mastodon',
|
|
||||||
output: '../assets/sw.js',
|
|
||||||
publicPath: '/sw.js',
|
|
||||||
minify: true,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
||||||
|
|
||||||
const merge = require('webpack-merge');
|
const environment = require('./environment')
|
||||||
const sharedConfig = require('./shared.js');
|
|
||||||
|
|
||||||
module.exports = merge(sharedConfig, {
|
module.exports = environment.toWebpackConfig()
|
||||||
mode: 'development',
|
|
||||||
});
|
|
||||||
|
@ -17,12 +17,13 @@ default: &default
|
|||||||
cache_manifest: false
|
cache_manifest: false
|
||||||
|
|
||||||
# Extract and emit a css file
|
# Extract and emit a css file
|
||||||
extract_css: true
|
extract_css: false
|
||||||
|
|
||||||
static_assets_extensions:
|
static_assets_extensions:
|
||||||
- .jpg
|
- .jpg
|
||||||
- .jpeg
|
- .jpeg
|
||||||
- .png
|
- .png
|
||||||
|
- .gif
|
||||||
- .tiff
|
- .tiff
|
||||||
- .ico
|
- .ico
|
||||||
- .svg
|
- .svg
|
||||||
@ -49,9 +50,11 @@ default: &default
|
|||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
|
||||||
compile: true
|
compile: true
|
||||||
|
|
||||||
|
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
|
||||||
|
check_yarn_integrity: true
|
||||||
|
|
||||||
# Reference: https://webpack.js.org/configuration/dev-server/
|
# Reference: https://webpack.js.org/configuration/dev-server/
|
||||||
dev_server:
|
dev_server:
|
||||||
https: false
|
https: false
|
||||||
@ -71,12 +74,10 @@ development:
|
|||||||
watch_options:
|
watch_options:
|
||||||
ignored: '**/node_modules/**'
|
ignored: '**/node_modules/**'
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
compile: true
|
||||||
# CircleCI precompiles packs prior to running the tests.
|
|
||||||
# Also avoids race conditions in parallel_tests.
|
|
||||||
compile: false
|
|
||||||
|
|
||||||
# Compile test packs to a separate directory
|
# Compile test packs to a separate directory
|
||||||
public_output_path: packs-test
|
public_output_path: packs-test
|
||||||
@ -87,5 +88,8 @@ production:
|
|||||||
# Production depends on precompilation of packs prior to booting for performance.
|
# Production depends on precompilation of packs prior to booting for performance.
|
||||||
compile: false
|
compile: false
|
||||||
|
|
||||||
|
# Extract and emit a css file
|
||||||
|
extract_css: true
|
||||||
|
|
||||||
# Cache manifest.json for performance
|
# Cache manifest.json for performance
|
||||||
cache_manifest: true
|
cache_manifest: true
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
"@babel/preset-react": "^7.0.0",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"@babel/runtime": "^7.5.4",
|
"@babel/runtime": "^7.5.4",
|
||||||
"@clusterws/cws": "^0.15.0",
|
"@clusterws/cws": "^0.15.0",
|
||||||
|
"@rails/webpacker": "^4.2.0",
|
||||||
"array-includes": "^3.0.3",
|
"array-includes": "^3.0.3",
|
||||||
"autoprefixer": "^9.6.1",
|
"autoprefixer": "^9.6.1",
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
@ -184,7 +185,7 @@
|
|||||||
"react-intl-translations-manager": "^5.0.3",
|
"react-intl-translations-manager": "^5.0.3",
|
||||||
"react-test-renderer": "^16.8.6",
|
"react-test-renderer": "^16.8.6",
|
||||||
"sass-lint": "^1.13.1",
|
"sass-lint": "^1.13.1",
|
||||||
"webpack-dev-server": "^3.8.0",
|
"webpack-dev-server": "^3.9.0",
|
||||||
"yargs": "^13.3.0"
|
"yargs": "^13.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = {
|
||||||
plugins: {
|
plugins: [
|
||||||
autoprefixer: {},
|
require('postcss-import'),
|
||||||
'postcss-object-fit-images': {},
|
require('postcss-flexbugs-fixes'),
|
||||||
cssnano: env === 'production' ? {} : false,
|
require('postcss-preset-env')({
|
||||||
|
autoprefixer: {
|
||||||
|
flexbox: 'no-2009'
|
||||||
},
|
},
|
||||||
});
|
stage: 3
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user