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

Using vux with webpacker gem #2344

Open
mbajur opened this issue Dec 26, 2017 · 0 comments
Open

Using vux with webpacker gem #2344

mbajur opened this issue Dec 26, 2017 · 0 comments

Comments

@mbajur
Copy link

mbajur commented Dec 26, 2017

Hello!

I'm aware that it's not a best place to post a question like this (as it's not directly a fault of vux i suppose) but i'm gonna try anyway :)

I have troubles setting up vux with Ruby on Rails app using webpacker gem. I followed your getting started guide and added a webpack vux loader config to my general webpack config file but webpack started to throw exceptions. Here is my webpack config:

https://github.com/mbajur/hcpl/blob/mobile/config/webpack/environment.js

const { environment } = require('@rails/webpacker')
const vuxLoader = require('vux-loader')

module.exports = vuxLoader.merge(environment, {
  plugins: ['vux-ui']
})

// This was originally exported by this file
// module.exports = environment

And webpack raises:

TypeError: environment.plugins.push is not a function
    at Object.<anonymous> (/Volumes/SUPPORT/Workspace/Personal/hcpl/config/webpack/environment.js:9:21)
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Volumes/SUPPORT/Workspace/Personal/hcpl/config/webpack/development.js:1:83)
    at Module._compile (module.js:641:30)

That might be an obvious issue but i'm not too good at webpack yet so i have no idea which fault is that (mine, vux-loader or webpacker) so i also don't know where should i post such question. I decided to start here.

The good part is that i'm definitely gonna write some tiny tutorial on how to integrate vux with rails/webpacker for future usage.

Thanks in advance!

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

1 participant