Skip to content

Instantly share code, notes, and snippets.

@JulianKniephoff
Created June 29, 2019 05:35
Show Gist options
  • Save JulianKniephoff/0373d9e9b147a06b52a86f237688c563 to your computer and use it in GitHub Desktop.
Save JulianKniephoff/0373d9e9b147a06b52a86f237688c563 to your computer and use it in GitHub Desktop.
Demonstrate a bug in webpack-contrib/exports-loader
var global = 42;
import {foo} from 'exports-loader?[name]=global!./foo.js';
console.log(foo);
{
"devDependencies": {
"exports-loader": "^0.7.0",
"webpack": "^4.35.0",
"webpack-cli": "^3.3.5"
}
}
module.exports = {
entry: './index.js'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment