GithubHelp home page GithubHelp logo

Comments (12)

peaceiris avatar peaceiris commented on May 30, 2024 1

How about ncc build ./src/main.ts -o dist?

from actions-netlify.

South-Paw avatar South-Paw commented on May 30, 2024 1

@nwtgck even though they don't use Typescript, they compile their package to a CJS format using webpack/babel and something is either wrong with that compile or it needs to go to more formats - I'm not very well versed in package formats (CJS/UMD etc) so I can't offer much more than blaming the netlify package 😄

Even so I would say it is certainly their packages issue - there is nothing wrong with your package here.

I have another Github action (its not really useful, just a playground action really) but I also checked how it built and I don't get the weird dist/typescript folder when I build using ncc either

from actions-netlify.

peaceiris avatar peaceiris commented on May 30, 2024

You may not need to run tsc before ncc build in your release process.

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

@peaceiris

Thanks!

I ran as follows, but "./dist/typescript" was still generated.

rm -r dist
# NOTE: I don't run "npm run build" not to run `tsc`
npm run format && npm run lint && npm run pack && npm test

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

Thanks! I removed ./dist and ran the ./node_modules/.bin/ncc build ./src/main.ts -o dist, but still generated.

image

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

note for me

Here are the whole diffs between the template and current files: 0340e02...825cfca. It seems there is no difference related to some configurations.

from actions-netlify.

South-Paw avatar South-Paw commented on May 30, 2024

Somehow it's related to the netlify import... might be something to do with how they export it 🤔

Removing the netlify import and then running ncc for me;

image

If I bring back the netlify import, it builds dist/typescript again.

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

@South-Paw Thank you very much for the information! According your investigation, import NetlifyAPI from 'netlify' creates /dist/typescript.

from actions-netlify.

South-Paw avatar South-Paw commented on May 30, 2024

@nwtgck 👍

It might be because of how they build/distribute their package... might be best to raise and issue over there to see if you can get anywhere.

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

@South-Paw Thanks. Maybe I should post the issue. But, netlify/js-client doesn't use TypeScript at all, written in JavaScript. I'd like to investigate the reason more.

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

@South-Paw Thanks.

I'm not very well versed in package formats (CJS/UMD etc)

Me too.

Your are the finder of import "netlify" thing. I think it is better to create the issue by you because you can be a contributor!

from actions-netlify.

nwtgck avatar nwtgck commented on May 30, 2024

#178 solves this issue! Thanks @rajington!
tsconfig.json: https://github.com/nwtgck/actions-netlify/pull/178/files#diff-e5e546dd2eb0351f813d63d1b39dbc48

from actions-netlify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.