tooltip icon indicating copy to clipboard operation
tooltip copied to clipboard

Unexpected token import

Open mmikhan opened this issue 7 years ago • 6 comments

I'm using this in a Electron Vue project and unfortunately the tooltip isn't working and shows the following error:

Uncaught SyntaxError: Unexpected token import

It looks like the console is having an issue with the first line of the import but I'm not sure what's could be wrong there. Any thoughts about this?

mmikhan avatar Apr 22 '17 20:04 mmikhan

i think the issue is about babel-loader config in your project i ran into same issue, but i solved it by copying tooltip from node_modules to my project src

wateryoma avatar May 04 '17 14:05 wateryoma

I've investigated this a lot but couldn't find any which is even related to the .babelrc file. I was using this with the Electron-Vue boilerplate.

mmikhan avatar May 04 '17 15:05 mmikhan

I'm using it with the same template, we have the same case. I just copied all vue bulma components i needed inside renderer components folder - not very elegant but this way everything works

wateryoma avatar May 04 '17 15:05 wateryoma

Yeah, it may work but I don't want to manage any dependencies without the dependency manager. I'd rather switch to a different library or wait until it's fixed.

mmikhan avatar May 04 '17 15:05 mmikhan

ok, let's hope it'll be fixed soon probably you should report this issue at Electron-Vue

wateryoma avatar May 04 '17 15:05 wateryoma

I'm also using electron-vue boilerplate and managed to make it work

You need to add vue-bulma-* module to webpack's whitelist .

// .electron-vue/webpack.renderer.config.js:21

let whiteListedModules = ['vue', 'vue-bulma-collapse', 'vue-bulma-tooltip', 'vue-bulma-notification']
let rendererConfig = {
  devtool: '#cheap-module-eval-source-map',
  entry: {
    renderer: path.join(__dirname, '../src/renderer/main.js')
  },
....

p418 avatar Sep 20 '17 07:09 p418