Created
December 16, 2016 08:08
-
-
Save diervo/fd1fb576e40bf2b6330e04b978323ced to your computer and use it in GitHub Desktop.
possible bug webpack - path.parse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When executing this: | |
__WEBPACK_IMPORTED_MODULE_0_path__["parse"])('/foo/bar/buzz.js'); | |
^^ | |
Script snippet #6:496 Uncaught TypeError: __webpack_require__.i(...) is not a function | |
__webpack_require__ being the path module, that contains all other methods (basename, extname, ...) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { parse } from 'path'; | |
const p = parse('/foo/bar/buzz.js'); | |
console.log(p); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
module.exports = { | |
entry: './test', | |
output: { | |
filename: 'test-output.js', | |
libraryTarget: 'this', | |
library: 'test' | |
}, | |
node: { | |
fs: 'empty' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment