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)
- platformWorkspaceApi EnclosingTabId Throws "n.connect is not a function" Errors HOT 4
- `renderedCallback` fires inconsistently after disconnect+reconnect in native lifecycle
- Validate if work is needed for closed TODO issues HOT 3
- `renderedCallback` documentation, spec, and consistency
- `getChildNodes` on a shadow root component (with slotted children) returns empty when all the ancestors are light DOM components HOT 1
- Move `databag` parsing after gathering static elements.
- Discrepancy between `@lwc/engine-dom` and `@lwc/engine-server` static parts application HOT 1
- [Static content optimization] `<iframe>` `onload` events may not fire
- Avoid recursively setting `KEY__SHADOW_RESOLVER`
- [Static optimization] Allow `key` directive HOT 1
- Support arguments for FACE callbacks
- [Static optimization] Concatenate adjacent static blocks
- Fix `className` types in `engine-core`
- Audit and consolidate usage of `null` and `undefined` in the engine HOT 1
- Investigate invalid types generated in `@lwc/shared/language.ts` HOT 1
- Adding multiple animations to an element breaks compiler's keyframe name replacement. HOT 2
- [HMR] `swapStyle()` API should swap CSS content rather than appending it HOT 3
- LWC compiler errors on `.jsx`/`.tsx` files HOT 6
- Normalize whitespace for `style` and `class` attributes (breaking change) HOT 2
- Inline styles do not parse `! important` correctly due to extra whitespace HOT 15
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.