lajosbencz / vue-wamp

AutobahnJS wrapper library fo Vue.js
MIT License
48 stars 13 forks source link

Error on installing 2.0.5 #19

Closed asalisaf closed 5 years ago

asalisaf commented 5 years ago

Hello I get these errors while compiling with Webpack:

ERROR Failed to compile with 4 errors

These relative modules were not found:

Any help would be appreciated

lajosbencz commented 5 years ago

Hello,

I'm having some trouble properly bundling the plugin. Currently, rollup is being used to generate a browser, commonjs and umd package, but when transpiling to the browser build, babel-polyfill causes this error.

Temporary solution here: #20

asalisaf commented 5 years ago

Thank a lot

TheDuckman commented 5 years ago

Hey there,

same problem here. the difference is I'm using yarn to manage the packages, not npm. I've tried the temporary solution you mentioned (i.e. adding resolve('node_modules/vue-wamp') to the webpack.base.conf.js file) but that didn't work.

Runing yarn dev gives me this:

ERROR Failed to compile with 4 errors

These relative modules were not found:

Any other suggestions?

Thanks in advance!

asalisaf commented 5 years ago

Hey @TheDuckman

Use: ES6 or Typescript:

import VueWamp from 'vue-wamp/dist/vue-wamp.esm'

CommonJS:

VueWamp = require( 'vue-wamp/dist/vue-wamp.cjs')

instead of:

import VueWamp from 'vue-wamp'
TheDuckman commented 5 years ago

@asalisaf thank you so much! Worked like a charm :D

byrgazov commented 5 years ago
// webpack.config.js
// ...
    resolve: {
        extensions: ['.vue', '.ts', '.js'],
        alias: {
            'vue-wamp': 'vue-wamp/dist/vue-wamp.esm.js',
        }
    },
//...