All Questions
762
questions
0
votes
0
answers
7
views
Rendering webpack bundled is code on html
I have compiled react component into a js bundle using webpack. Importing this into other react projects works just fine.
Is there any way to render this js file on a normal html file, without using ...
0
votes
0
answers
18
views
How to attach url params to webpack dev server host?
I use webpack dev-server with npm and having simple config file all works perfectly except that I would like to have dev-server runnning the browser with additional url params attached to 'host' url.
...
1
vote
0
answers
24
views
Run JS from bubble (import failing) [duplicate]
I've got a simple HTML element in Bubble.io that I'm trying to run javascript from. I keep getting import errors:
Either it isn't a module and I can't use import
Or
It doesn't recognize exported ...
1
vote
1
answer
69
views
Export React as one inline HTML file
I am making one-page websites for particular service that accepts only single inline html files. I want to make these webpages as modularly as possible (to make many versions of them) and am thus ...
0
votes
1
answer
219
views
import.meta.url emits file:/// rather than http://?
I've read the docs of import.meta.url saying :
The full URL to the module, includes query parameters and/or hash
(following the ? or #). In browsers, this is either the URL from which
the script was ...
0
votes
0
answers
27
views
How to have separate CSS files for separate JavaScript files using Webpack?
I am trying to use two separate css files for two seperate HTMl page files using Webpack.
This is my webpack config file:
const path = require('path');
module.exports = {
mode: 'development',
...
0
votes
0
answers
55
views
How can I bundle my full-stack TS application with HTML all into one html,js and css file?
At first I had a simple TS app, used tsc to compile the typescript into js. But eventually the application got bigger and now I need to bundle everything into one HTML, CSS and JS file. I tried ...
0
votes
1
answer
151
views
How to cross-load assets from separate site built with Vite as you would with Webpack in an HTML file?
I recently upgraded one of my projects from Vue-cli/Vue 2 over to Vue 3 and Vite for deployment. The app was deployed to an external server and works perfectly fine. However, the switch from vue-cli ...
1
vote
0
answers
214
views
Convert webpack.config.js to vite
I'm trying to migrate my react app from webpack to vite
Here's my webpack config file :
/* eslint-disable no-undef */
const devCerts = require("office-addin-dev-certs");
const ...
0
votes
0
answers
27
views
Use webpack built wasm project within hugo
I have been trying to get my wasm app running on my Hugo site for the past week, and have run into a dead end.
After building everything with webpack, my dist directory looks like this:
project/dist ❯ ...
0
votes
0
answers
13
views
Updating the webpack-dev-server page when the html file changes
I'm trying to create a gulp build using webpack-dev-server to reflect changes during development. But in the process I encountered the problem of importing html components using the example @@include(&...
0
votes
2
answers
61
views
Dynamically calling a function based on its name stored in a string
I am trying to dynamically call a function based on its name stored in a string using bracket notation on the window object. I have also tried using eval() to no success.
The project has been bundled ...
0
votes
0
answers
47
views
Uncaught TypeError: r(...).connect is not a function - Webpack - MQTT protocol
I'm using NodeJS and I have to get information from a TTN server via a MQTT protocol and then display it on a website. As 'require' is not recognized by browsers, I had to use browserify or webpack ...
1
vote
1
answer
40
views
Uncaught ReferenceError: bundle is not defined when calling bundled JavaScript function
I'm encountering a ReferenceError when trying to call a function from my bundled JavaScript file in an HTML button's onclick attribute. The error message I'm seeing is:
Uncaught ReferenceError: bundle ...
0
votes
0
answers
25
views
React scripts not loading on localhost using npm start, but load when opening the index.html in firefox
I've been learning react and webpack at the same time to try set up a webapp to learn web development. I've recently started learning react to make some toggle buttons work, but for some reason they ...