Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meteor-client-bundler doesn't like 'static-html' #78

Open
atao60 opened this issue Aug 18, 2018 · 4 comments
Open

meteor-client-bundler doesn't like 'static-html' #78

atao60 opened this issue Aug 18, 2018 · 4 comments

Comments

@atao60
Copy link

atao60 commented Aug 18, 2018

See demo on github: https://github.com/atao60/angular-meteor-example-AngularCLI-bare. It's in a non working status to show the issue.

The installation is described in detail in the file HISTORY.

Trying to set up a minimal configuration to be used with meteor-client-bundler, I started from scratch and used meteor create --base in place of meteor create. Then meteor-client-bundler crashed:

Errors prevented bundling:                    
While processing files with static-html (for target web.browser):
client/main.html:12: Expected <head> or <body> tag

While processing files with static-html (for target web.browser.legacy):
client/main.html:12: Expected <head> or <body> tag

/home/pierre/Développements/pwa/cornflourblue-ng6-bs4-login/demo7B/node_modules/meteor-client-bundler/node_modules/execa/index.js:350
		throw err;
		^

As soon as static-html is removed from api/.meteor/packages, everything runs fine.

meteor-client-bundler should be able to deal with api/.meteor/packages's content, whatever the template used to create it.

@ardatan
Copy link
Collaborator

ardatan commented Aug 18, 2018

I will look at this issue soon, but PRs are welcome :)

@atao60
Copy link
Author

atao60 commented Aug 19, 2018

PRs are welcome

I have no clues on what direction to get.
MCB has a very indifferent policy about what can be taken in account as meteor packages.
In this spirit, if 'static-html' is there, MCB must keep it? Then please it by providing a default dummy file client/main.htm, something like an empty body <body></body>.

PS. In my own projects I don't need 'static-html', so removing it before running MCB is OK for me.

@gustawdaniel
Copy link

I simply removed static-html from meteor by command:

cd api
meteor remove static-html

because of meteor can communicate with frontend by DDP or REST or APOLLO so there is no sense of using static-html. Potentially if you want to render html you can use express in meteor.

@gustawdaniel
Copy link

@ardatan do you think we should add message about there is no point use static-html with meteor-client-bundler if this package would be detected?

I suggest add to docs info that anyone should remove this package, because of it is added by default to meteor create --bare.

In article

https://blog.meteor.com/leverage-the-power-of-meteor-with-any-client-side-framework-bfb909141008

this is not mentioned because of on list of packages installed by default by meteor

https://docs.meteor.com/commandline.html

static-html is not listed for standard meteor create, but in context of this package meteor create --bare seems to be more appropriate because of in typical usage of this package blaze-html-templates and most packages from default version are not needed too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants