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

Uncaught SyntaxError: Unexpected token . in goldenlayout-base.css, internal require #16

Closed
mrdotkg opened this issue Aug 14, 2018 · 1 comment

Comments

@mrdotkg
Copy link

mrdotkg commented Aug 14, 2018

HI Eddow,

Could you please look into this?

import Vue from 'vue'
import vgl from 'vue-golden-layout'

Vue.use(vgl)

The Above line of codes throw me the below error:

/Users/kumar/workspace/staff-vue/node_modules/golden-layout/src/css/goldenlayout-base.css:1 Uncaught SyntaxError: Unexpected token .
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object._b2fa.f.(anonymous function) (/Users/kumar/workspace/staff-vue/node_modules/vue-golden-layout/dist/vue-golden-layout.js:44:1)

I have satisfied the jquery dependenc.
Webpack

new webpack.ProvidePlugin({
			$: 'jquery',
			jQuery: 'jquery'
		})

main.js

window.jQuery = window.$ = require('jquery/dist/jquery.min')

@mrdotkg
Copy link
Author

mrdotkg commented Aug 15, 2018

I figured out this was due to the boilerplate I am using. It assumes we add 'vue-golden-layout' package in White-listing Externals.

Boilerplate Instructions
https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals

Affected source code
https://github.com/SimulatedGREG/electron-vue/blob/master/template/.electron-vue/webpack.renderer.config.js#L14-L21

@mrdotkg mrdotkg closed this as completed Aug 15, 2018
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