Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

330
Views
Rollup + vue3 - plugin commonjs--resolver SyntaxError - estilo de etiqueta incomprensible en tepmlate

Tengo un problema con la construcción de la biblioteca en vue3 + rollup. ¿Alguien tiene alguna idea? Cuando elimino la etiqueta de template.vue, el proyecto se compila correctamente.

Salida: [!] (complemento commonjs--resolver) SyntaxError: /shared-vue3/src/lib-components/shared/ShEntryWrapper.vue?vue&type=style&index=0&scoped=true&lang.css: Token inesperado (1:0)

resumen.config

 const baseConfig = { plugins: { preVue: [ alias({ entries: [ { find: '@', replacement: `${path.resolve(projectRoot, 'src')}` } ] }) ], replace: { 'process.env.NODE_ENV': JSON.stringify('production') }, vue: { isProduction: true, style: { isProd: true, preprocessLang: 'scss', scoped: true } }, postVue: [ resolve({ extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'] }), commonjs() ], babel: { exclude: 'node_modules/**', extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'], babelHelpers: 'bundled' } } }; const esConfig = { ...baseConfig, input: 'src/entry.esm.ts', external, output: { file: 'dist/pixel-vue-shared.esm.js', format: 'esm', exports: 'named' }, plugins: [ peerDepsExternal(), replace(baseConfig.plugins.replace), ...baseConfig.plugins.preVue, vue(baseConfig.plugins.vue), ...baseConfig.plugins.postVue, // Only use typescript for declarations - babel will // do actual js transformations typescript({ typescript: ttypescript, useTsconfigDeclarationDir: true, emitDeclarationOnly: true, declaration: true }), babel({ ...baseConfig.plugins.babel, presets: [ [ '@babel/preset-env', { ...babelPresetEnvConfig, targets: esbrowserslist } ] ] }), terser({ compress: { unsafe: true }, mangle: true, keep_fnames: true, keep_classnames: true, output: { ecma: 5 } }) ] };

Este código funciona con vue2.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!