Comments (4)
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.
Out of curiosity, why did you want to use Webpack with LWR? Or were you just trying to use Webpack alone?
from lwc.
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.
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)
- Normalize whitespace for `style` and `class` attributes (breaking change) HOT 2
- Inline styles do not parse `! important` correctly due to extra whitespace HOT 15
- Bundle our licenses correctly in our npm packages
- lwr project does not run anymore (sudden death) HOT 1
- Use `node:` protocol for all builtin imports (`fs`, `path`, etc.) HOT 1
- Specify the minimum supported version of Node in `engines` HOT 1
- Reduce verbosity in `template.stylesheets` generated code
- Switch from Jest to Vitest HOT 1
- [HMR] `swap*` APIs show stale content when swapping back and forth multiple times HOT 1
- [HMR] `swapStyle()` API does not account for stylesheet collisions
- [HMR] `swapStyle()` does not work for `static stylesheets`
- Executing Static Resources within LWC HOT 1
- Inconsistent attribute ordering between static/dynamic nodes
- Lightning-datatable has wrong type of parameters passed to custom type columns through typeAttributes that passsed not with "fieldName" HOT 3
- KOA Server Not Able to Add Routes HOT 2
- Lightning datatable admits only 100 records (or something lower than 150, idk) HOT 2
- Add support for dynamic `<slot>` names HOT 3
- Version mismatch warning should warn for patch version differences as well HOT 2
- `@api` decorated property is not reactive with private class properties HOT 1
- Be homogenous to traverse the parent DOM between shadow dom and `lwc:render-mode="light"` mode HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lwc.