question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use exported models

See original GitHub issue

Type of Issue

[ ] Bug Report [ ] Feature Request [x] Question

Description

How to create sub package for each kind of export? For example, I want import statement to look like this for each type of file exported:

Models (inluding interfaces and classes) import {FooModel, BarModel} from 'my-lib/models';

Enums import {FooTypes, BarTypes} from 'my-lib/enums';

Right now, as all the exports are from public_api.ts file, my import statements look like this:

Models (inluding interfaces and classes) import {FooModel, BarModel} from 'my-lib';

Enums import {FooTypes, BarTypes} from 'my-lib';

I tried creating export files but webpack fails to compile. Here’s the link to full question, with code and error statement: StackOverflow

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alan-agius4commented, Jul 5, 2018

If you wish to use import {MyModel} from 'my-custom-library/models' you’d need to create secondary entrypoints.

With your current implementation that is something which is not possible.

Take a look at this documentation; https://github.com/dherges/ng-packagr/blob/master/docs/secondary-entrypoints.md

0reactions
github-actions[bot]commented, Jun 19, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to import model files generated using Export-AxModel ...
Unable to import models using AXUTIL.EXE, where the models were created using Powershell cmdlet Export-AxModel. To demonstrate the issue create ...
Read more >
Re: Can't export Substance Model Graph, keeps fail...
I'm trying to export a mesh made in Substance 3D designer as a Substance 3D model file. However, upon exporting, I get an...
Read more >
Unable to export a host model and its links to IFC as a unique ...
Solution: In order to export linked models as IFC try: Using the standard IFC Export, Revit will not include linked models.
Read more >
I can't get my export to work for my Sequelize model
You need to export sequelize instance in index.js and use it in user-model.js instead of creating one more Sequelize instance there:
Read more >
Unable to export model file - HyperMesh - Altair Community
Make sure you change the user profile to Radioss before you export. Thank you. Helpful (0).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found