'webpack not running with no clue
i am getting
Cannot GET /
in browser after running webpack successfully
webpack output :-
> webpack-dev-server --port 2000 --mode=development
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:2000/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.9.34:2000/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::7f07:7fab:cc74:fba8]:2000/
<i> [webpack-dev-server] Content not from webpack is served from '/home/pi/black/public' directory
asset google-maps.js 253 KiB [emitted] (name: main)
runtime modules 27.2 KiB 12 modules
modules by path ./node_modules/ 166 KiB
modules by path ./node_modules/webpack-dev-server/client/ 52.4 KiB 12 modules
modules by path ./node_modules/webpack/hot/*.js 4.3 KiB
./node_modules/webpack/hot/dev-server.js 1.59 KiB [built] [code generated]
./node_modules/webpack/hot/log.js 1.34 KiB [built] [code generated]
+ 2 modules
modules by path ./node_modules/html-entities/lib/*.js 81.3 KiB
./node_modules/html-entities/lib/index.js 7.74 KiB [built] [code generated]
./node_modules/html-entities/lib/named-references.js 72.7 KiB [built] [code generated]
+ 2 modules
./node_modules/@googlemaps/js-api-loader/dist/index.esm.js 9.56 KiB [built] [code generated]
./node_modules/ansi-html-community/index.js 4.16 KiB [built] [code generated]
./node_modules/events/events.js 14.5 KiB [built] [code generated]
./src/google-maps.js 3 KiB [built] [code generated]
webpack 5.72.0 compiled successfully in 1342 ms
my webpack.config.js
const path = require('path');
module.exports = {
entry: './src/google-maps.js',
output: {
filename: 'google-maps.js',
path: path.resolve(__dirname, 'static/js'),
},
devServer: {
allowedHosts: 'all',
},
};
my directories :- image
ask me if you need more information
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
