-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"ReferenceError: window is not defined " in Postman #3
Comments
@VipinMishra did you build yourself or just use my existing script. If you build yourself remember modify umd to var as my description. Or you can download my existing forge.js and try again |
Hello Thanks |
I was having the same issue. Here's my solution:
const bundle = Object.assign({}, common, {
mode: 'development',
output: {
path: path.join(__dirname, 'dist'),
filename: info.filenameBase + '.js',
library: info.library || '[name]',
libraryTarget: info.libraryTarget || 'var'
},
plugins: [
new webpack.ProvidePlugin({
window: 'global/window',
}),
]
});
if (info.library === null) {
delete bundle.output.library;
}
if (info.libraryTarget === null) {
delete bundle.output.libraryTarget;
}
// optimized and minified bundle
const minify = Object.assign({}, common, {
mode: 'production',
output: {
path: path.join(__dirname, 'dist'),
filename: info.filenameBase + '.min.js',
library: info.library || '[name]',
libraryTarget: info.libraryTarget || 'var'
},
devtool: 'cheap-module-source-map',
plugins: [
new webpack.ProvidePlugin({
window: 'global/window',
}),
]
});
Hope that helps! |
Hi,
I am follow all the steps and try to use RSA encryption in postman but getting error "ReferenceError: window is not defined". Please help me to fix this issues.
The text was updated successfully, but these errors were encountered: