Webpack_loader.exceptions.WebpackBundleLookupError: Cannot resolve bundle vendor. на загрузчике webpack
Я запускаю сервер для webpack.
Журнал находится здесь ниже.
yarn dev
yarn run v1.22.18
warning ../package.json: No license field
warning ../../package.json: No license field
$ webpack-dev-server --mode=development
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:3000/
<i> [webpack-dev-server] On Your Network (IPv4): http://10.41.232.84:3000/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:3000/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/whitebear/MyCode/httproot/aicomposer_cdk/aicomposer/frontend/public' directory
(node:50012) [DEP_WEBPACK_TEMPLATE_PATH_PLUGIN_REPLACE_PATH_VARIABLES_HASH] DeprecationWarning: [hash] is now [fullhash] (also consider using [chunkhash] or [contenthash], see documentation for details)
(Use `node --trace-deprecation ...` to show where the warning was created)
asset js/vendor.911d558c052970cd108d.bundle.js 210 KiB [emitted] [immutable] (name: vendor) (id hint: commons)
asset js/base.911d558c052970cd108d.bundle.js 54 KiB [emitted] [immutable] (name: base)
Entrypoint base 264 KiB = js/vendor.911d558c052970cd108d.bundle.js 210 KiB js/base.911d558c052970cd108d.bundle.js 54 KiB
runtime modules 28.3 KiB 13 modules
modules by path ./node_modules/ 166 KiB
modules by path ./node_modules/webpack-dev-server/client/ 53.5 KiB 12 modules
modules by path ./node_modules/style-loader/dist/runtime/*.js 5.75 KiB 6 modules
modules by path ./node_modules/webpack/hot/*.js 4.3 KiB 4 modules
modules by path ./node_modules/html-entities/lib/*.js 81.3 KiB 4 modules
modules by path ./node_modules/css-loader/dist/runtime/*.js 2.33 KiB
./node_modules/css-loader/dist/runtime/noSourceMaps.js 64 bytes [built] [code generated]
./node_modules/css-loader/dist/runtime/api.js 2.26 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]
modules by path ./static/ 2.79 KiB
./static/entries/base.js 64 bytes [built] [code generated]
./static/styles/sample.css 2.27 KiB [built] [code generated]
./node_modules/css-loader/dist/cjs.js!./static/styles/sample.css 463 bytes [built] [code generated]
webpack 5.74.0 compiled successfully in 327 ms
Теперь я могу получить доступ и подтвердить, что эта ссылка работает.
http://localhost:3000/static/js/vendor.911d558c052970cd108d.bundle.js
и
http://localhost:3000/static/js/base.911d558c052970cd108d.bundle.js
Теперь в django template
я пытаюсь сделать url по django-webpack-loader
{% load render_bundle from webpack_loader %}
{% render_bundle 'vendor' 'js'%}
{% render_bundle 'base' 'js'%}
возникает ошибка
webpack_loader.exceptions.WebpackBundleLookupError: Cannot resolve bundle vendor.