Closed thescientist13 closed 6 years ago
Hi Owen!
Thanks for your feedback/additional links, very interesting stuff. Im interested in your thoughts about the webpack stuff, i'd happily take a look at a PR if you think it can be improved. (Especially interested in the viability of babel-preset-env)
As for using express, it is a little overkill for what it's doing atm, but the point is to allow people to start quickly extending on this starter kit, and while I'd like to minimize some dependencies, the goal is not to have no dependencies at all. Also I feel like express is commonly recognized enough to warrant including it.
As for using express, it is a little overkill for what it's doing atm, but the point is to allow people to start quickly extending on this starter kit
I agree with this 100%. I really liked the fact that it had Express "built in", even with the extra config.
Thanks for the feedback @thepassle and @aadamsx ! Looking forward to sharing.
Hey @thepassle , here's where I've gotten so far in my efforts.
Here is a branch with my latest WIP of a simple Todo App using LitElement
preset-env
to transpile only the code that is needed based on a CanIUse querythis
and properties I think.
CopyWebpackPlugin
though, or maybe polyfill.io)Here is some documentation I've written that can provide some more info. Basically without targetting IE11, there are no issues. Not sure what kind of browser support you had in mind.
> 1%
not op_mini all
module.exports = {
presets: ['@babel/preset-env'],
plugins: [
['babel-plugin-transform-builtin-classes', {
globals: ['LitElement']
}]
]
};
module.exports = {
plugins: {
'postcss-cssnext': {},
'cssnano': {}
}
};
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.0.2/custom-elements-es5-adapter.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.0.0/polyfill.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.0.2/webcomponents-bundle.js"></script>
Once i get all the browsers working, I would look to apply similar changes here.
Looking forward to your thoughts!
Hey owen! Finally have some time to really dive into this. The setup/config you have looks great, very clean. Im really looking to get rid of some dependencies and overall trying to have the build configuration much more clean, with as little means as necessary.
My main concern is browser support, as of now CLA supports at least the latest 2 versions of all major browsers, though I think we should be able to get that up and running as well. I'll have more time to work on it this friday, i expect i'll have some more info by then.
Fixed in d86159d3d360cfc62746b3459e230f6f7358b544
Thanks for the feedback! :)
Introductions 👋
First off, very cool project! I say that with all the envy and respect of someone who wishes they had thought of the idea first 😄
webpack Feedback
I'm still getting more familiar with the build and development workflows for "vanilla JS" projects with webpack in my own side project, but I have a fair amount of webpack experience with frameworks like Angular, React and Vue.
In reviewing I came out with a few observations for your consideration:
import
statements included from some point starting with theentry
point as this is how webpack is able to build up the dependency graph to fully optimize a build. Copying the files manually might negate the advantage webpack brings of being able to fully optimize and bundle / code split source files.import
in index.jsMisc Feedback
Happy to make a PR if you're onboard with these changes! ✌️