Closed Trispa closed 8 years ago
It's hard to say anything concrete based on that error alone. Are you referring to the file containing collections
through an import statement? If you expect it to be global, look into shimming modules.
By the way, Stack Overflow might work better for generic issues like this. It would be good to restrict this tracker to book related problems.
thanks @bebraw for help.
I rephrase my question, I have a scripts
folder that contains my modules that i would like to load with webpack. it's seem webpack knows only modules located in node-modules folder.
So what can i tell webpack to load my modules which located in my scripts
folder.
i tried to configure pakage.json to add scripts
folder in node-modules with npm like automaticly but it's not work.
So what can i tell webpack to load my modules which located in my scriptsfolder.
You could try resolve.modulesDirectories. Add the scripts
directory to the array and it should look up modules from there as well as you might expect.
I tried that but i have stil error : collections is not defined
this error refere to here (near new whene creting an insance og collections :
var EventBusHandler = (function () {
function EventBusHandler() {
this.eventBusHandlerState = vertx.EventBus.CLOSED;
this.queue = new collections.Queue();
It's hard to tell anything based on that alone. As long as you have an import statement for collections
within that file, it should definitely work.
I don't use import statement but exports loader you can see again my webpack.config.js content in my first comment.
I don't use import statement but exports loader you can see again my webpack.config.js content in my first comment.
But as per documentation exports-loader just writes a exports["file"] = file
kind of line. It won't make the code available to your other module.
Is there some particular reason why you cannot import directly? Maybe you want to use expose-loader instead? The book discusses one way to split.
As this isn't book related, I'm closing this for now. But feel free to continue on those paths.
hi since 3 days i try to resolve a probleme about webpack configuration. my code was with requirejs an now i use webpack. i used this link for support : https://gist.github.com/xjamundx/b1c800e9282e16a6a18e. in fact, i have a probleme to load my modules : in my webpack-config.js file i have some things like that :
in my index file ia have :
but i stil have error : Uncaught ReferenceError: collections is not defined
can someone helps me please ?