My Babel is configured with the @babel/plugin-proposal-class-properties plug-in, which allows you to use arrow functions in class under webpack, and error reports under rollup
Binote opened this issue · 2 comments
Binote commented
Version information for key packages:
{
"@babel/helper-module-imports": "^7.7.4",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/core": "^7.7.4",
"rollup-plugin-babel": "^4.3.3",
"rollup": "^1.27.8"
}
Error message:
(node:10232) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token (9:5) in /Users/mac/code/wanwu-base-vue/example/main.js
at Object.pp$4.raise (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:2836:15)
at Object.pp.unexpected (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:689:10)
at Object.pp.expect (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:683:28)
at Object.pp$3.parseMethod (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:2620:10)
at Object.pp$1.parseClassMethod (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:1387:25)
at Object.pp$1.parseClassElement (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:1376:10)
at Object.pp$1.parseClass (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:1315:26)
at Object.pp$1.parseStatement (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:833:19)
at Object.parseStatement (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/dist/rollup.js:11727:30)
at Object.pp$1.parseTopLevel (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:746:23)
at Object.parse (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:553:17)
at Function.parse (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/node_modules/acorn/dist/acorn.js:576:37)
at Graph.contextParse (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup/dist/rollup.js:13072:70)
at tryParse (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:267:12)
at checkEsModule (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:281:15)
at Object.transformAndCheckExports (/Users/mac/.nvm/versions/node/v10.16.0/lib/node_modules/@wanwu/cli-plugin-rollup/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js:762:30)
(node:10232) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10232) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Andarist commented
Please provide a runnable repro case for your problem.
Andarist commented
Closing because a runnable repro case has not been shared since January