mirror of
https://github.com/flarum/core.git
synced 2025-07-16 22:31:18 +02:00
Optimize babel config to reduce output filesize
This commit is contained in:
@@ -27,9 +27,12 @@ module.exports = function(options = {}) {
|
|||||||
use: {
|
use: {
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: {
|
options: {
|
||||||
presets: ['@babel/preset-env', '@babel/preset-react'],
|
presets: [
|
||||||
|
['@babel/preset-env', {modules: false, loose: true}],
|
||||||
|
['@babel/preset-react']
|
||||||
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
['@babel/plugin-transform-runtime'],
|
['@babel/plugin-transform-runtime', {useESModules: true}],
|
||||||
['@babel/plugin-proposal-class-properties'],
|
['@babel/plugin-proposal-class-properties'],
|
||||||
['@babel/plugin-transform-react-jsx', {pragma: 'm'}]
|
['@babel/plugin-transform-react-jsx', {pragma: 'm'}]
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user