Import Parsimmon
See original GitHub issueI’m creating a ES2015 (classes and modules) library. I want to use Parsimmon and import it like
import { Parsimmon } from "parsimmon"
To package my application I use Rollup
// rollup.config.js
import resolve from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
export default {
input: 'js/export.js',
output: {
file: 'dist/ueblueprint.js',
format: 'es'
},
plugins: [
resolve({ browser: true })//,
//terser()
]
}
The problem is that even though I do set the dependency in NPM
// package.json
{
"scripts": {
"build": "rollup --config"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.0.5",
"rollup": "^2.58.0",
"rollup-plugin-terser": "^7.0.2",
"terser": "^5.9.0"
},
"dependencies": {
"parsimmon": "^1.18.0"
}
}
When I run npm run build, I get the following error
[!] Error: 'Parsimmon' is not exported by node_modules\parsimmon\build\parsimmon.umd.min.js, imported by ...
I tried both import with curly braced and without
Do you know what it could be?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
parsimmon - npm
Parsimmon is a small library for writing big parsers made up of lots of little parsers. The API is inspired by parsec and...
Read more >parsimmon/API.md at master - GitHub
import { digits, whitespace } from "parsimmon"; var parser = digits.sepBy(whitespace);. Because it can become quite wordy to repeat Parsimmon everywhere:.
Read more >Fresh Persimmon global imports and top importers 2022 - Tridge
Discover the import data of Fresh Persimmon with wide coverage like top importing countries, markets, prices, and analysis of importing countries.
Read more >Persimmon Imported (each) Delivery or Pickup Near Me
Get Persimmon Imported delivered to you in as fast as 1 hour via Instacart or choose curbside or in-store pickup. Contactless delivery and...
Read more >APHIS Proposes Import of Fresh Persimmon Fruit
APHIS Proposes to Allow Persimmon from New Zealand to be Imported into the United States The United States Department of Agriculture's Animal and...
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
Hello, thanks for the suggestion but it didn’t work. At the end I could manage to have it bundled using also commonJS https://github.com/rollup/plugins/tree/master/packages/node-resolve#using-with-rollupplugin-commonjs and importing it like import Parsimmon from “parsimmon”
Anyway, thanks. This library is brilliant, it does a lot of work and the packaged size is very small compared to what it offers. Keep up the good work.
Quite so 😆