Bump webpacker from 3.5.5 to 4.0.2 (#10277)
Bumps [webpacker](https://github.com/rails/webpacker) from 3.5.5 to 4.0.2. - [Release notes](https://github.com/rails/webpacker/releases) - [Changelog](https://github.com/rails/webpacker/blob/master/CHANGELOG.md) - [Commits](https://github.com/rails/webpacker/compare/v3.5.5...v4.0.2) Signed-off-by: dependabot[bot] <support@dependabot.com> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>local
parent
5a9978f02a
commit
8347479f5d
46 changed files with 1694 additions and 1690 deletions
@ -1,6 +1,6 @@ |
||||
.hero-widget |
||||
.hero-widget__img |
||||
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('preview.jpg'), alt: @instance_presenter.site_title |
||||
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title |
||||
|
||||
.hero-widget__text |
||||
%p= @instance_presenter.site_short_description.html_safe.presence || @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname) |
||||
|
@ -1,12 +0,0 @@ |
||||
const { env, publicPath } = require('../configuration.js'); |
||||
|
||||
module.exports = { |
||||
test: /\.(jpg|jpeg|png|gif|svg|eot|ttf|woff|woff2)$/i, |
||||
use: [{ |
||||
loader: 'file-loader', |
||||
options: { |
||||
publicPath, |
||||
name: env.NODE_ENV === 'production' ? '[name]-[hash].[ext]' : '[name].[ext]', |
||||
}, |
||||
}], |
||||
}; |
@ -1,12 +0,0 @@ |
||||
const { resolve } = require('path'); |
||||
|
||||
const env = process.env.NODE_ENV || 'development'; |
||||
|
||||
module.exports = { |
||||
test: /\.js$/, |
||||
exclude: /node_modules/, |
||||
loader: 'babel-loader', |
||||
options: { |
||||
cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'), |
||||
}, |
||||
}; |
@ -1,21 +0,0 @@ |
||||
const { resolve } = require('path'); |
||||
|
||||
const env = process.env.NODE_ENV || 'development'; |
||||
|
||||
if (env === 'development') { |
||||
module.exports = {}; |
||||
} else { |
||||
// babel options to apply only to external libraries, e.g. remove-prop-types
|
||||
module.exports = { |
||||
test: /\.js$/, |
||||
include: /node_modules/, |
||||
loader: 'babel-loader', |
||||
options: { |
||||
babelrc: false, |
||||
plugins: [ |
||||
'transform-react-remove-prop-types', |
||||
], |
||||
cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader-external'), |
||||
}, |
||||
}; |
||||
} |
@ -0,0 +1,21 @@ |
||||
const { join, resolve } = require('path'); |
||||
const { env, settings } = require('../configuration'); |
||||
|
||||
module.exports = { |
||||
test: /\.(js|jsx|mjs)$/, |
||||
include: [ |
||||
settings.source_path, |
||||
...settings.resolved_paths, |
||||
].map(p => resolve(p)), |
||||
exclude: /node_modules/, |
||||
use: [ |
||||
{ |
||||
loader: 'babel-loader', |
||||
options: { |
||||
cacheDirectory: join(settings.cache_path, 'babel-loader'), |
||||
cacheCompression: env.NODE_ENV === 'production', |
||||
compact: env.NODE_ENV === 'production', |
||||
}, |
||||
}, |
||||
], |
||||
}; |
@ -0,0 +1,20 @@ |
||||
const { join } = require('path'); |
||||
const { settings } = require('../configuration'); |
||||
|
||||
module.exports = { |
||||
test: new RegExp(`(${settings.static_assets_extensions.join('|')})$`, 'i'), |
||||
use: [ |
||||
{ |
||||
loader: 'file-loader', |
||||
options: { |
||||
name(file) { |
||||
if (file.includes(settings.source_path)) { |
||||
return 'media/[path][name]-[hash].[ext]'; |
||||
} |
||||
return 'media/[folder]/[name]-[hash:8].[ext]'; |
||||
}, |
||||
context: join(settings.source_path), |
||||
}, |
||||
}, |
||||
], |
||||
}; |
@ -0,0 +1,14 @@ |
||||
const babel = require('./babel'); |
||||
const css = require('./css'); |
||||
const file = require('./file'); |
||||
const nodeModules = require('./node_modules'); |
||||
|
||||
// Webpack loaders are processed in reverse order
|
||||
// https://webpack.js.org/concepts/loaders/#loader-features
|
||||
// Lastly, process static files using file loader
|
||||
module.exports = { |
||||
file, |
||||
css, |
||||
nodeModules, |
||||
babel, |
||||
}; |
@ -0,0 +1,26 @@ |
||||
const { join } = require('path'); |
||||
const { settings, env } = require('../configuration'); |
||||
|
||||
module.exports = { |
||||
test: /\.(js|mjs)$/, |
||||
include: /node_modules/, |
||||
exclude: /@babel(?:\/|\\{1,2})runtime/, |
||||
use: [ |
||||
{ |
||||
loader: 'babel-loader', |
||||
options: { |
||||
babelrc: false, |
||||
presets: [ |
||||
['@babel/env', { modules: false }], |
||||
], |
||||
plugins: [ |
||||
'transform-react-remove-prop-types', |
||||
], |
||||
cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'), |
||||
cacheCompression: env.NODE_ENV === 'production', |
||||
compact: false, |
||||
sourceMaps: false, |
||||
}, |
||||
}, |
||||
], |
||||
}; |
@ -1,29 +0,0 @@ |
||||
module.exports = { |
||||
projects: [ |
||||
'<rootDir>/app/javascript/mastodon', |
||||
], |
||||
testPathIgnorePatterns: [ |
||||
'<rootDir>/node_modules/', |
||||
'<rootDir>/vendor/', |
||||
'<rootDir>/config/', |
||||
'<rootDir>/log/', |
||||
'<rootDir>/public/', |
||||
'<rootDir>/tmp/', |
||||
], |
||||
setupFiles: [ |
||||
'raf/polyfill', |
||||
], |
||||
setupTestFrameworkScriptFile: '<rootDir>/app/javascript/mastodon/test_setup.js', |
||||
collectCoverageFrom: [ |
||||
'app/javascript/mastodon/**/*.js', |
||||
'!app/javascript/mastodon/features/emoji/emoji_compressed.js', |
||||
'!app/javascript/mastodon/locales/locale-data/*.js', |
||||
'!app/javascript/mastodon/service_worker/entry.js', |
||||
'!app/javascript/mastodon/test_setup.js', |
||||
], |
||||
coverageDirectory: '<rootDir>/coverage', |
||||
moduleDirectories: [ |
||||
'<rootDir>/node_modules', |
||||
'<rootDir>/app/javascript', |
||||
], |
||||
}; |
Loading…
Reference in new issue