Closed RoXuS closed 3 years ago
Hi @RoXuS, does it cause any problems if sources are published to npm?
I believe TS files are required for source maps to work. I didn't exclude them because I saw that lit-element
keeps them as well, see their package.json.
Maybe, we should exclude test/*
only? What do you think?
Hum in general we keep only d.ts, d.ts.map, js.map, js which are usefull to detect types when it uses as an external dependencies. As you can see in the following screenshot, lit-element seems to not publish ts files only d.ts:
It's that why I keep d.ts with !*.d.ts
To answer you, we have an issue because our TS try to convert your loader.ts, we don't know why, even if node_modules it excluded from tsconfig...
Right, LitElement does not have any ts files at the top-level, but under src/, for example node_modules/lit-element/src/lit-element.ts. Could this be the problem? Can you confirm whether that solves the issue you have?
I checked the contents of js.map and d.ts.map files, they reference the ts file at the top-level, so I am afraid we need to include the sources in the package somewhere.
Perhaps the best course of action here is to follow LitElement setup:
Let me also verify if the changed directory structure will work in our internal setup.
Yeah, src folder solves our issues.
Let me know if you have any questions. Thx!
@RoXuS I pushed #302 to npm as 4.0.1. Let me know if I didn't solve the issue.
Ts files and test folder should not be published to the registry.