mistlog / svelte-draft

Develop svelte app in typedraft/typescript
https://mistlog.github.io/svelte-draft-docs
MIT License
36 stars 1 forks source link

Webpack support #5

Closed fabian-michael closed 4 years ago

fabian-michael commented 4 years ago

Hi, is there already a loader/plugin for webpack?

mistlog commented 4 years ago

Currently there is no loader/plugin for webpack.

I'm not familiar with webpack, if you need it, I can implement one, but it takes some time for me to learn it. Or if you are interested in it, I think the rollup version can be a reference.

fabian-michael commented 4 years ago

It's quite easy and I could try but unfortunately I haven't that much time. I am in an apprenticeship as an IT specialist (web development) and also involved in our customer projects. Maybe I could do it as an educational project by my own.

mistlog commented 4 years ago

I accepted the invitation of svelte-draft-loader, thanks!

So what does educational project mean? Anyway, I'm going to learn webpack in order to join the discussion of the loader implementation later.

fabian-michael commented 4 years ago

That means just that I do this for learning purposes as part of my apprenticeship during my working hours haha 😄

mistlog commented 4 years ago

Great, feel free to ask any questions!

fabian-michael commented 4 years ago

Should it really be able to transpile pure typedraft (the part with if (id.endsWith('.js.tsx') || id.endsWith('.ts')) ) ?

I would do that in another plugin or loader. So it has clear separation of concerns.

mistlog commented 4 years ago

Yes, it works, svelte-draft is built upon typedraft. However, I think the suggestion is good, we can have standalone plugin or loader for typedraft!

fabian-michael commented 4 years ago

I can't publish on npmjs right now because I can't verify my email address. I get a service unavailable error.

mistlog commented 4 years ago

If you are using computer in your company, the npm registry may point to private one. npm publish works only if npm config get registry returns https://registry.npmjs.com/.

fabian-michael commented 4 years ago

I am in home office (due to corona virus) and in my home network. But it fails at verifying my email address. And I can't publish without verifying it.

mistlog commented 4 years ago

fails at verifying my email

when you create npm account or run command npm publish?

fabian-michael commented 4 years ago

Creating my account. When I open the verification link in the email I get a service unavailable error. And when trying to publish it says I have to verify my email address first.

mistlog commented 4 years ago

Yes, you have to create the account first.

Before you run npm publish, npm login is also needed.

mistlog commented 4 years ago

I remembered that when I create my account, after verifying it, "please verify your email..." still exists on the site, but I just ignored it and npm login, npm publish works fine.

fabian-michael commented 4 years ago

It worked now. It's online! 😄

mistlog commented 4 years ago

Great! Thanks for spending time on it! I'm going to have a try(loader and template) and add them to docs.

mistlog commented 4 years ago

:) it works well, and I added it to svelte-draft-tutorial as well!