mirror of
https://github.com/flarum/core.git
synced 2025-05-15 20:05:58 +02:00
Optimize babel config to reduce output filesize
This commit is contained in:
parent
eb9756a39e
commit
14825b58a7
@ -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'}]
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user