Closed GBrachetta closed 1 year ago
I'm unable to reproduce this. What Node.js and Meow version?
I believe the issue came when I imported my package.json
in a modules file with:
import pkgJSON from '../package.json' assert {type: 'json'};
I don't get the warning if I use:
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const pkgJSON = require('../package.json');
Pity, because the former is a lot clearer.
Closing as this is not a problem with Meow.
Meow returns the package data, so not sure why you are importing it yourself.
I'm using Meow in a CLI which uses modules rather than common imports (
import meow from 'meow'
), and I get a warning when, for example, I use the built-in--version
flag, saying that importing JSON modules is an experimental feature:Obviously this pollutes the output.
Is there a way to hide this warning?