Code Monkey home page Code Monkey logo

Comments (4)

nolanlawson avatar nolanlawson commented on May 28, 2024

Using Webpack is actually a totally different setup than using LWR. LWR by itself does not rely on Webpack at all.

If you want to use Webpack, then you would have to configure your project yourself without any scaffolding. The best guide in this case would be the lwc-webpack-plugin guide. For a scaffold, you might start with a "hello world" Webpack app, e.g. this.

Sorry you have a bad experience, and sorry that the guides are unclear about this!

from lwc.

nolanlawson avatar nolanlawson commented on May 28, 2024

Out of curiosity, why did you want to use Webpack with LWR? Or were you just trying to use Webpack alone?

from lwc.

wimvelzeboer avatar wimvelzeboer commented on May 28, 2024

Well, I was trying to see if I could use LWC in a non-Node environment. Like if I can use it on a web-hosting location that runs Apache+PhP+MySQL.

I thought the Webpack was supposed to be able to convert a Node-package to something that can run in just a browser, without Node-backend.

But then also out of curiosity, for what reason is that Webpack listed on the setup guide in the first place?
I was following the exact descriptions of the guide, but can't complete it, even though it might have not been something for my use-case...

I will go through that setup-guide you suggested!

from lwc.

nolanlawson avatar nolanlawson commented on May 28, 2024

Either Rollup or Webpack can be used to create JavaScript artifacts that can run in the browser without a Node.js backend.

If you're looking for something extremely simple, I would recommend checking out our StackBlitz playground which is basically an LWC "hello world" using Rollup. Running npm install && npm run build will generate JavaScript artifacts that can run in the browser.

from lwc.

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.