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

vite build error #498

Closed
thjxs opened this issue Sep 7, 2023 · 2 comments
Closed

vite build error #498

thjxs opened this issue Sep 7, 2023 · 2 comments

Comments

@thjxs
Copy link

thjxs commented Sep 7, 2023

使用 vite@4.4.9 打包的时候出现以下异常
Missing "./style/jsmind.css" specifier in "jsmind" package
复现步骤

  1. npm create vite@latest
  2. 安装 jsmind
  3. 引入样式 import 'jsmind/style/jsmind.css'
  4. npm run build
@hizzgdev
Copy link
Owner

hizzgdev commented Sep 8, 2023

感谢报告这个 bug, 我修复了这个问题,并把版本升级了一下,你使用最新的版本 0.7.1 应该就可以 import 了。

import jsMind from 'jsmind'
import 'jsmind/draggable-node'
import 'jsmind/screenshot'
import 'jsmind/style/jsmind.css'

如果还有其它问题请继续在此 issue 下回复。感谢! @thjxs

@hizzgdev
Copy link
Owner

hizzgdev commented Sep 8, 2023

<script>
    import jsMind from 'jsmind'
    import 'jsmind/draggable-node'
    import 'jsmind/style/jsmind.css'

    export default {
        mounted() {
            let options = {
                container: this.$refs.jsmind_container,
                editable: true
            };
            let jm = new jsMind(options);
            jm.show();
        }

    }
</script>

<style scoped>
    .jsmind-container {
        width: 800px;
        height: 500px;
        border: solid 1px #ccc;
    }
</style>

<template>
    <div ref="jsmind_container" class="jsmind-container"></div>
</template>

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

2 participants