egoist / bili

Bili makes it easier to bundle JavaScript libraries.

Home Page:https://bili.egoist.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.vue file jsx error

djkloop opened this issue · comments

image

// babel.config.js
module.exports = {
    presets: ['bili/babel'],
}


// bili.config.js
module.exports = {
    plugins: {
        vue: {
            runtimeHelpers: true
        },
    },
  // ...other options
}

image

// babel.config.js
module.exports = {
    presets: ['@vue/app'],
    'plugins': [
        [
            '@babel/plugin-transform-runtime',
            {
                'absoluteRuntime': false,
                'corejs': false,
                'helpers': true,
                'regenerator': true,
                'useESModules': false
            }
        ]
    ]
}

// bili.config.js
module.exports = {
    plugins: {
        vue: true,
    },
// ...other options
}

Vue-cli provides a built-in set of babel configuration options. How can I use it?

PS: @vue/cli-plugin-babel

@djkloop Vue JSX support is removed, it seems to be rarely used. Let me know if you need it.

You should configure your own babel config and enable babel in bili.config

just like this

// bili.config.js

module.exports = {
   babel: {
       configFile: true
   }
}