json-schema-ref-parser
json-schema-ref-parser copied to clipboard
[help wanted] Importing $RefParser causing 'Uncaught ReferenceError: require$$0 is not defined' error.
I've been trying to use this library in my Svelte App, but for some reason when I try to import $RefParser like so:
import $RefParser from '@apidevtools/json-schema-ref-parser';
My App logs the following error to the console: Uncaught ReferenceError: require$$0 is not defined
.
I'm using rollup as my bundler, here's my plugins configuration within my rollup.config.js file:
plugins: [
svelte({
emitCss: false,
compilerOptions: {
dev: !production
}
}),
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs({
include: 'node_modules/**'
}),
jsonPlugin(),
I've been trying to play with the plugins order and parameters, but so far nothing seems to make it work.
I am also getting the same error, have you managed to fix it in the past 8 months
In the last 8 months I’ve been scaling the growth of a climate action charity, and I’ve been asking you all for pull requests to help with bugs you’re experiencing. Please do send in some fixes with a few tests and we can get this issue closed.
I made my own system for my project anyway as other ref-parser's didn't work well for me, but I'll leave this open incase someone wants to fix it