[vite]: Rollup failed to resolve import "@inertiajs/inertia-react" from "D:/work/laravel_react/resources/js/Pages/Posts/Create.jsx".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build:
Error: [vite]: Rollup failed to resolve import "@inertiajs/inertia-react" from "D:/work/laravel_react/resources/js/Pages/Posts/Create.jsx".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at viteWarn (file:///D:/work/laravel_react/node_modules/vite/dist/node/chunks/dep-df561101.js:48142:27)
at onRollupWarning (file:///D:/work/laravel_react/node_modules/vite/dist/node/chunks/dep-df561101.js:48174:9)
at onwarn (file:///D:/work/laravel_react/node_modules/vite/dist/node/chunks/dep-df561101.js:47902:13)
at file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:24152:13
at Object.logger [as onLog] (file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:25825:9)
at ModuleLoader.handleInvalidResolvedId (file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:24738:26)
at file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:24698:26
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I faced this error when I build this project.
[vite]: Rollup failed to resolve import "@inertiajs/inertia-react" from "D:/work/laravel_react/resources/js/Pages/Posts/Create.jsx". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build: Error: [vite]: Rollup failed to resolve import "@inertiajs/inertia-react" from "D:/work/laravel_react/resources/js/Pages/Posts/Create.jsx". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it tobuild.rollupOptions.external
at viteWarn (file:///D:/work/laravel_react/node_modules/vite/dist/node/chunks/dep-df561101.js:48142:27) at onRollupWarning (file:///D:/work/laravel_react/node_modules/vite/dist/node/chunks/dep-df561101.js:48174:9)at onwarn (file:///D:/work/laravel_react/node_modules/vite/dist/node/chunks/dep-df561101.js:47902:13) at file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:24152:13 at Object.logger [as onLog] (file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:25825:9) at ModuleLoader.handleInvalidResolvedId (file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:24738:26) at file:///D:/work/laravel_react/node_modules/rollup/dist/es/shared/node-entry.js:24698:26 at processTicksAndRejections (node:internal/process/task_queues:96:5)