I’m upgarding my project from canjs 2 (and require ) to canjs 3 (and webpack 1). I identify that the can-util/xxx modules are loaded by many can-xxx modules. Example for “can-util/dom/events/attributes/attributes” with webpack log :
If you follow the readme to install the dependencies and build the bundle, you should be able to load index.html and see “Inserted was called” on the page.
It’d be great if you could fork that branch and come up with a minimal case where it fails, or if you could share a minimal example from the code you’re working with, that would work too.
[Also, since you’re making the switch, have you considered StealJS for your module loading/bundling needs? If you have but decided against it, I’d love to understand why it wasn’t a good fit for you!]
First, thank you for the very prompt response (and the wonderful canjs project !). With your fork everthing work well ! I tried to reproduce these issues with my package.json, webpack config… no effect, everthing work well…
Finally I delete my “node-modules” directory and then re-run an npm install for my project => No more issues
Next time, I will try that if a stange behaviour appears…
For the choice “steal vs webpack” is not my main priority because I migrate my code from requirejs/canjs 2 using strict ES6 syntax without extra webpack loader prefix :
import "myFile.css"
no
import “css!./stylesheet.css”.
So I think I will switch to steal.js without code migration. I’ like webpack loaders for js / css / sass / stache / svg (svg to font). I lose stache compilation on build (can-complile)…
Next step : mocha integration for test (webpack + babel + canjs + mocha…)
I will try steal.js after for the same project to compare these 2 solutions and validate a final choice.
node_modules issues are a pain. I’m glad it’s working now!
When you decide to check out StealJS, be sure to check out the website to find plugins for mocha, sass, stache, svg, etc. Always feel free to post here if you have any questions.