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

how to add this functions into my existing react project with components. #189

Closed
DmitriyKushkulov opened this issue Jul 28, 2021 · 3 comments
Labels

Comments

@DmitriyKushkulov
Copy link

I can't this function with the Components in existing my react project.

Steps to reproduce the behavior:

  1. I have added the new router with '/paperbits' to add this component.
  2. And then created the components that named Paperbits.
  3. Also I didn't use the webpack.
  4. this is the error screen for compile.

****Failed to compile.
./node_modules/@paperbits/common/persistence/offline.module.ts 11:27
Module parse failed: Unexpected token (11:27)
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
| * Module registering components required for offline work.
| */

export class OfflineModule implements IInjectorModule {
| constructor(private readonly options?: OfflineOptions) {
| this.register = this.register.bind(this);****

  1. Screenshots.
    image
    image
    image
    image

Please help me. really thanks.

@azaslonov
Copy link
Member

Hi @DmitriyKushkulov, so this will not currently work without webpack, because it takes care of multiple things, i.e. loading referenced *.html files from npm packages. We are planning to publish packages with pre-compiled files along with Typings, so that scenario like yours would work, and we won't break existing customers, but this is coming later this year.

So, you either have to go with webpack, as shown in the demo project, or wait until we switch to new packaging.

@DmitriyKushkulov
Copy link
Author

Hello. Alexander Zaslonov.
really thanks.

@azaslonov
Copy link
Member

I guess we forgot to close this issue, so doing it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants