Versions:
"rollup": "^3.7.5"
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.0.0",
I read the doc: https://github.com/rollup/plugins/tree/master/packages/babel#using-with-rollupplugin-commonjs, and put @rollup/plugin-commonjs before @rollup/plugin-babel like following:
rollupPluginCommonjs(),
rollupPluginCommonjs(),
rollupPluginBabel({
// runtime 需安装 @babel/runtime
babelHelpers: 'bundled',
exclude: '**/node_modules/**',
configFile: options.babelConfigPath || false,
extensions: [...DEFAULT_EXTENSIONS, '.ts', '.tsx'],
}),
But when parse a js with decorator, occur error:
[!] (plugin commonjs--resolver) SyntaxError: Unexpected character '@' (9:0) in /Users/yutengjing/code/editor-next/packages/editor/chart-render/src/charts/column/index.js
src/charts/column/index.js (9:0)
7: * @class Column
8: */
9: @DimensionRevise(TwoDimension)
^
10: export default class Column extends BaseColumn {
11: getDefaultModel() {
SyntaxError: Unexpected character '@' (9:0) in xxx/yyy.js
Why documentation note @rollup/plugin-commonjs must before @rollup/plugin-babel? Any problems If I reverse their order?
Versions:
I read the doc: https://github.com/rollup/plugins/tree/master/packages/babel#using-with-rollupplugin-commonjs, and put @rollup/plugin-commonjs before @rollup/plugin-babel like following:
But when parse a js with decorator, occur error:
Why documentation note
@rollup/plugin-commonjs must before @rollup/plugin-babel? Any problems If I reverse their order?