Skip to content

vue-tour.css - Module Parse failed: Unexpected token (1:13) #269

@jjakob666

Description

@jjakob666

If I add the import of the vue-tour.css after the import VueTour from 'vue-tour' I get a compilation error

using:

"node_modules/vue": "version": "2.7.14",
"node_modules/vue-tour": "version": "2.0.0",
npm: '9.5.0',
  node: '18.15.0',
index.js
`
...

//product tour capability: https://pulsardev.github.io/vue-tour/?ref=madewithvuejs.com
import VueTour from 'vue-tour';
//require('vue-tour/dist/vue-tour.css'); //fails parsing
import 'vue-tour/dist/vue-tour.css'; //fails parsing
Vue.use(VueTour);

...

`

watch compilation reports this error:

`
ERROR in ./node_modules/vue-tour/dist/vue-tour.css 1:13
Module parse failed: Unexpected token (1:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> body.v-tour--active {
|       pointer-events: none
| }
 @ ./js/vue/index.js 33:0-36
 @ ./js/index.js 15:2-18

webpack 5.77.0 compiled with 1 error and 19 warnings in 597 ms
`

If I comment out the css import it compiles file and the tour runs fine, but obviously there is no theming and it looks terrible.

unminified first couple lines of the css position 13 is the double --:

`
body.v-tour--active {
	pointer-events: none
}

.v-tour {
	pointer-events: auto
}

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions