Skip to content

i use timeline for my nuxt app. but import SyntaxError, how i fix it? #94

@onepisYa

Description

@onepisYa

Describe the bug

i use timeline for my nuxt app. but import SyntaxError, how i fix it?

To Reproduce

Expected behavior

Screenshots

Environment:

  • OS: macOS Monterey 12.3.1
  • Browser: Chrome 100.0.4896.127 (正式版本) (arm64)
  • Build environment (i.e. NodeJS): node v16.14.2 and "nuxt": "^2.15.8"

Suggestion(s) for fixing this issue

add exports fields to package.json maybe

Additional context

this is my ~/plugins/vue-horizontal-timeline.js

import Vue from "vue";
// const timeline = require("vue-horizontal-timeline"); // not work too.
// import VueHorizontalTimeline from "vue-horizontal-timeline"; // not work too.
import {VueHorizontalTimeline } from "vue-horizontal-timeline"; // Cannot use import statement outside a module

Vue.use(VueHorizontalTimeline);
// Vue.use(timeline);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions