Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Can we have an example that builds a node package of components for use in a SPA #142

@SteveALee

Description

@SteveALee

Reading through the docs and googling I've yet to find a good example of this. The main clarification needed is what TSC options to use in the package creation when it's not for use by node but using node as the dev platform in a bundler/transpiler like webpack. The package should then be usable from TS or javascript (do will be JS + typingsm not ts files). Ideally a UMD version would be included for use from browser global scripts

My exact use case is to create a set of TS components released as a npm package that can be used when building a SPA style app using webpack which also use TS. In other words, need to build and consume a TS module that is published via npm and used in code transpiled to ES5 to run in a web conext (TS + babel using webpack).

I'm actually using CycleJS but I'd be happy for an extended version of the react example that uses a separately published package for part of it's functionality.

I've no doubt this is easy to achieve but so far I have failed. Even pointer to an example would be useful

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions