Which happens at src/index.js 1st line import statement.
It's because the package doesn't offer built dist files - the package.json has defined
"main": "src/index.js"
which is in ES6. The thing is that most webpack configurations exclude node_modules from transpilation, and expect to find ES5 code, as it would be inefficient to transpile the whole node_modules on each build.
The solution would be to offer the compiled library, such as dist/vue-wysiwyg.js, and add that file into the "main" propery of "package.json". Here are some issues that talk about similar problems:
Cool package!
I tried using it with https://github.com/vuejs-templates/webpack boilerplate, but get this error when I include it into the project:
Which happens at
src/index.js
1st lineimport
statement.It's because the package doesn't offer built dist files - the
package.json
has definedwhich is in ES6. The thing is that most webpack configurations exclude
node_modules
from transpilation, and expect to find ES5 code, as it would be inefficient to transpile the wholenode_modules
on each build.The solution would be to offer the compiled library, such as
dist/vue-wysiwyg.js
, and add that file into the"main"
propery of "package.json". Here are some issues that talk about similar problems:https://github.com/charliekassel/vuejs-datepicker/issues/15 https://github.com/matfish2/vue-stripe/pull/3
Thanks!