[bug] Rollup: Unexpected character '#'
See original GitHub issueRollup throws this error:
SyntaxError: Unexpected character '#' (67:2) in [redacted]\node_modules\dog\index.js
It seems to be caused by hashtag-prefixed members in the class, in index.js:
// src/group.ts
var Group = class {
#child; // <------ THIS LINE
#mapping;
#kids;
#sorted;
#current;
constructor(state, env) {
this.uid = state.id.toString();
this.#mapping = new Map();
this.#kids = new Map();
this.#sorted = [];
let refs = this.link(env);
this.#child = refs.child;
}
receive(req) {
return abort(404);
}
Any idea how to make it work with Rollup? I can’t seem to find a straightforward solution on Google too. The example from this repo is not bundling the worker through Webpack or Rollup.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Unexpected character '@' (Note that you need plugins to ...
When I use Scss in rollup, and When I build project then there is a error: [!] Error: Unexpected character '@' (Note that...
Read more >@rollup/plugin-typescript - npm
Start using @rollup/plugin-typescript in your project by running `npm i ... Error: Unexpected token (Note that you need plugins to import ...
Read more >rollup 打包build报错:[!] Error: Unexpected character '@' (Note ...
Error : Unexpected character '@' (Note that you need plugins to import files that are not JavaScript)styles\index.scss (1:0)1: @import '.
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Learn how to use Rollup as a smaller, more efficient alternative to webpack and Browserify to bundle JavaScript files in this step-by-step tutorial...
Read more >Discussion on: How to Build A React TS Tailwind Design System
Error : Unexpected character '@' (Note that you need plugins to import ... I'm currently using the tsdx + tailwind + rollup-plugin-postcss + ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can’t remember why I needed the
nodeGlobals()
, perhaps to access theprocess
constant. I didn’t actually need it in the project after all. 😅Anyway, great package. It was easy to implement and wanted to build myself one, now we know who codes faster. 😄
Ah, nice find! I think you should only need
rollup-plugin-node-polyfills
– although it’d be better to find/update dependencies that don’t need Node internals at all!