-
Notifications
You must be signed in to change notification settings - Fork 1
using it in another project #3
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
Labels
good first issue
Good for newcomers
Comments
resolved in team-innovation/vue-sfc-rollup#89. |
Quoting @mgdodge: If you are writing a library of components, however, you must choose to import the entire library, or use a slightly different syntax to import individual components: // Import and register entire library
import MyLibrary from '@knowscount/my-library';
Vue.use(MyLibrary); // Import and register globally individual components from the library
import { MyComponent, MyComponent2 } from '@knowscount/my-library';
Vue.component('MyComponent', MyComponent);
Vue.component('MyComponent2', MyComponent2); // Import and register locally individual components from the library
import { MyComponent, MyComponent2 } from '@knowscount/my-library';
export default {
name: 'SomeParentComponent',
components: {
MyComponent,
MyComponent2,
}
...
} The sample you provided is a library which currently contains a single component. I tested it, and everything works if you follow any of the library example listed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to add
vue-lib
component library I ranand then placed
<InputBox />
&import InputBox from '@knowscount/vue-lib
, registering the component, yet the page went blank and the folioing error was reported in the console:and also
The text was updated successfully, but these errors were encountered: