question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use with Rollup?

See original GitHub issue

Hello Miguel, Thank you for your effort to improve i18n on Svelte.

I am currently using svelte-i18n and a good part of our bundle is the icu-messageformat-parser. I tried to install svelte-intl-precompile, but failed.

My rollup.config.js:

import precompileIntl from "svelte-intl-precompile/sveltekit-plugin";

export default {
  input: 'src/main.js',
  output: {
    sourcemap: true,
    format: 'iife',
    name: 'app',
    file: 'public/main.js',
  },
  plugins: [
    commonjs(),
    recompileIntl('i18n'),
  ]

I am getting:

Node tried to require an ES module from a CommonJS file, which is not supported

Is it possible to use with Rollup?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cibernoxcommented, Jun 8, 2021

Cool, let me know if you find anything that doesn’t work. I for instance I’m aware that ordinals (1st, 2nd, 3rd) might not work yet, but afaik everything else should be working.

0reactions
hmaestacommented, Jun 8, 2021

Not so much, to be honest. Around 100 lines – but a lot with singular/plural variations. The biggest problem was:

file: /node_modules/@formatjs/icu-messageformat-parser/lib/parser.js original size: 48.151 KB

Read more comments on GitHub >

github_iconTop Results From Across the Web

rollup.js
Rollup can be used either through a command line interface with an optional configuration file, or else through its JavaScript API. Run rollup...
Read more >
SQL ROLLUP
This tutorial shows you how to use the SQL ROLLUP, which is an extension of the GROUP BY clause, to perform multiple levels...
Read more >
SQL Server ROLLUP By Practical Examples
The SQL Server ROLLUP is a subclause of the GROUP BY clause which provides a shorthand for defining multiple grouping sets. Unlike the...
Read more >
SELECT WITH ROLLUP - MariaDB Knowledge Base
The WITH ROLLUP modifier adds extra rows to the resultset that represent super-aggregate summaries. The super-aggregated column is represented by a NULL value....
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
In their own words: Rollup is a next-generation JavaScript module bundler. Author your app or library using ES2015 modules, then efficiently bundle them...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found