Skip to content
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

Webpack Async Example Error #12

Closed
gregpalaci opened this issue Jun 4, 2016 · 10 comments
Closed

Webpack Async Example Error #12

gregpalaci opened this issue Jun 4, 2016 · 10 comments

Comments

@gregpalaci
Copy link

riotjs-loader works fine the in the example without async, but in async throws:

ERROR in ./src/view/detail-view.html Module build failed: Error: TypeError: unknown: resolveModuleSource is not a function at Object.module.exports (/Users/gnb/Sites/Playground/feplay/riot_webpack_async/node_modules/riotjs-loader/index.js:32:11) @ ./src/riotTags.js 9:0-34

@txchen
Copy link
Owner

txchen commented Jun 7, 2016

@gregbenner I cannot repro this. Would you please try purge and npm install again?
I am using node 6.2, npm 3.8.9

@txchen txchen closed this as completed Jun 7, 2016
@kevinroisin
Copy link

kevinroisin commented Jul 29, 2016

I believe I am hitting this same error:

ERROR in ./src/view/detail-view.html
Module build failed: Error: TypeError: unknown: resolveModuleSource is not a function
    at Object.module.exports (/Users/kevin/Code/riotjs/feplay/riot_webpack_async/node_modules/riotjs-loader/index.js:32:11)
 @ ./src/riotTags.js 9:0-34
webpack: bundle is now VALID.
^C
~/Code/riotjs/feplay/riot_webpack_async on gh-pages ? node -v
v6.2.2
~/Code/riotjs/feplay/riot_webpack_async on gh-pages ? npm -v
3.9.5

@txchen
Copy link
Owner

txchen commented Jul 29, 2016

@kevinroisin I just did a git clean -fxd, and I can repro it. Looking into it.

@kevinroisin
Copy link

@txchen wow, thank you for the fast response!

@txchen
Copy link
Owner

txchen commented Jul 29, 2016

It might be related to riot/compiler#73

@kevinroisin
Copy link

That makes sense, as if I switch to the require style of importing, it works:

import stores from '../stores' to var stores = require('../stores')

@txchen
Copy link
Owner

txchen commented Jul 29, 2016

Let me try to upgrade all packages and use webpack 6.

In fact, I am now using vuejs for my projects since they maintain much better scaffolding template via vue-cli. webpack is really hard to config, man :)

@kevinroisin
Copy link

kevinroisin commented Jul 29, 2016

I was comfortable with Angular, but Angular2 seemed like serious overkill to me for small projects so I was looking for something smaller. RIOT looks minimal, so I'm testing it out. But that said, Vue.js does look pretty slick and not tremendously bulky.

Can't catch them all!

@txchen
Copy link
Owner

txchen commented Jul 29, 2016

I think it is now fixed, just upgrade everything to latest.

My own experience is: vue is much much more stable, you will not spend a lot of time dealing with issues like this issue, the tooling support it really better than riot.

It is said with webpack 2's tree shaking + vue 2, the footprint will be smaller. Now I think the size of vue is not a big issue, because it is still much smaller than angular/react. Yes it is larger than riot, but it offers more useful features. Worth taking a look :)

@kevinroisin
Copy link

And it's fixed. Thank you!

I'll spend some more time on looking into vuejs. Your examples for riot have been really helpful, so if you like vuejs more it's probably worth diving into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants