Closed lajosbencz closed 4 years ago
For now, the solution for me is to include the node_modules/vue-wamp
folder in the webpack babel configuration:
{
test: /\.js$/,
loader: 'babel-loader',
include: [
resolve('src'),
resolve('test'),
// include vue-wamp for transpilation:
resolve('node_modules/vue-wamp'),
]
},
For now, the solution for me is to include the
node_modules/vue-wamp
folder in the webpack babel configuration:{ test: /\.js$/, loader: 'babel-loader', include: [ resolve('src'), resolve('test'), // include vue-wamp for transpilation: resolve('node_modules/vue-wamp'), ] },
@lajosbencz Where exactly did you add that? If I understand it correctly you configure Webpack stuff through the vue.config.js file. Do you have an example with all the code necessary for me to implement it?
Thanks.
Hey @awulkan There is bundling issue as @lajosbencz mentioned and should be fixed. Permanently you can use one of these solutions:
For ES6 or Typescript:
import VueWamp from 'vue-wamp/dist/vue-wamp.esm'
For CommonJS:
VueWamp = require( 'vue-wamp/dist/vue-wamp.cjs')
import VueWamp from 'vue-wamp/dist/vue-wamp.esm'
Worked for me
Since v3.x, no bundling is provided. It is up to the consumer to transpile the code.
When installing through npm, the default browser build gets imported.
Resulting error:
Solution: Properly configure rollup