kubernetes-models-ts icon indicating copy to clipboard operation
kubernetes-models-ts copied to clipboard

Include /src files in published packages (base, validate)

Open thiagoelg opened this issue 1 year ago • 2 comments

While working with this library I noticed that for the base and validate packages the webpack was throwing warnings related to the source maps referencing missing files:

WARNING in ../../node_modules/.pnpm/@[email protected]/node_modules/@kubernetes-models/validate/dist/index.js
Module Warning (from ../../node_modules/.pnpm/[email protected][email protected]/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/thiagolugli/ibm/kie-tools/node_modules/.pnpm/@[email protected]/node_modules/@kubernetes-models/validate/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/thiagolugli/ibm/kie-tools/node_modules/.pnpm/@[email protected]/node_modules/@kubernetes-models/validate/src/index.ts'

and

WARNING in ../../node_modules/.pnpm/@[email protected]/node_modules/@kubernetes-models/base/dist/model.js
Module Warning (from ../../node_modules/.pnpm/[email protected][email protected]/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/thiagolugli/ibm/kie-tools/node_modules/.pnpm/@[email protected]/node_modules/@kubernetes-models/base/src/model.ts' file: Error: ENOENT: no such file or directory, open '/Users/thiagolugli/ibm/kie-tools/node_modules/.pnpm/@[email protected]/node_modules/@kubernetes-models/base/src/model.ts'

My suspicion is that since the /src directory is not published with those packages the source-map-loader can't reference them.

The solution proposed here is to publish the /src directory.

thiagoelg avatar Apr 11 '23 19:04 thiagoelg

Hi @tommy351, any chance you can take a look at this PR? Thanks a lot in advance!

tiagobento avatar Apr 19 '23 21:04 tiagobento

@tommy351 Hi! Could you please take a look at this PR? It's pretty simple and improved the experience when developing apps that depend on it. Thanks a lot!

tiagobento avatar Jun 15 '23 22:06 tiagobento