Open
Description
Do you want to request a feature or report a bug?
Bug with WHATWG URL API provided by native url
module.
What is the current behavior?
// ES6
import { URL } from 'url';
console.log(typeof URL); // undefined
// CommonJS
const { URL } = require('url');
console.log(typeof URL); // undefined
If the current behavior is a bug, please provide the steps to reproduce.
I provided code above, is it a normal behavior and we should use Web API URL or WHATWG URL API should be provided through url
module?
What is the expected behavior?
// ES6 modules
import { URL } from 'url';
console.log(typeof URL); // function
// CommonJS modules
const { URL } = require('url');
console.log(typeof URL); // function
Please mention your webpack and Operating System version.
node 8.2.1
webpack 3.3.0
macOS Sierra 10.12.6
This issue was moved from webpack/webpack#5372 by @sokra. Orginal issue was by @zalishchuk.
node-url exports it as exports.Url
instead of exports.URL
Metadata
Metadata
Assignees
Labels
No labels