vue extension file with jsx
githubtuxedo opened this issue · 3 comments
githubtuxedo commented
.babelrc
{
"presets": [
// "@babel/preset-react",
"@vue/babel-preset-jsx",
["@babel/preset-env"],
],
"plugins": ["@babel/plugin-transform-runtime"],
// "plugins": ["transform-vue-jsx", "transform-runtime"],
"env": {
"test": {
"presets": ["@babel/preset-env"],
"plugins": ["transform-es2015-modules-commonjs", "dynamic-import-node"]
}
}
}
.vue file
<template></template>
...
<script>
method: {
func(h, { node, data, store }): { return <span>test</span> }
}
</script>
Err msg: Support for the experimental syntax 'jsx' isn't currently enabled
githubtuxedo commented
.package.json
"vue-loader": "^15.0.10",
"webpack": "^4.46.0",
"@babel/plugin-syntax-jsx": "^7.0.0",
"@babel/polyfill": "^7.12.1",
"@babel/core": "^7.12.13",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.12.13",
"@babel/register": "^7.0.0",
ablikim915 commented
Err msg: Support for the experimental syntax 'jsx' isn't currently enabled
I have same issue
baixiaoji commented
I have same issue