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

Avoid hardcoding lit-app.js in the webpack config #13

Open
jlengrand opened this issue Dec 1, 2018 · 0 comments
Open

Avoid hardcoding lit-app.js in the webpack config #13

jlengrand opened this issue Dec 1, 2018 · 0 comments

Comments

@jlengrand
Copy link

jlengrand commented Dec 1, 2018

Currently, the lit-app.js file is the entry point of the application in the webpack config.

const commonConfig = merge([
  {
    entry: './src/lit-app.js',
    output: {
      path: OUTPUT_PATH,
      filename: '[name].[chunkhash:8].js'
    },
   ....

I see several issues with this:

  • You have to change the config if you want to change the main entry point of your application
  • If you don't all users of create-lit-app will have an identical lit-app web component in their front-end, possibly leading to conflicts.
  • I was very confused that my app wouldn't show up any more when I renamed the lit-app element, and it took me a while to figure it out.

I suggest to put the main entry point to be the index.html itself, but any other idea is very welcome!

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

1 participant