rollup -c --bundleConfigAsCjs
< /code>
Я получаю следующую ошибку < /p>
./src/index.ts → dist_rollup/lib-OB-ian.js...
[!] Error: Could not load C:\Users\...\file.css?inline (imported by file.ts): ENOENT: no such file or directory, open 'C:\Users\file.css?inline'
at open (node:internal/fs/promises:636:25)
at Object.readFile (node:internal/fs/promises:1246:14)
at C:\Users\PORT_IM_3\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:20102:24
at Queue.work (C:\Users\PORT_IM_3\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:20468:32)
< /code>
Я считаю, что Rollup пытается Acess файл, который «.css? inline» вместо «.css», но я не уверен. Есть ли способ исправить это?import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import typescript from "@rollup/plugin-typescript";
import json from "@rollup/plugin-json";
import css from "rollup-plugin-import-css";
import postcss from 'rollup-plugin-postcss';
export default [
{
input: './src/index.ts',
output: [
{
file: 'dist_rollup/lib-OB-ian.js',
format: 'cjs'
},
],
plugins: [resolve(), commonjs(), typescript({ tsconfig: "./tsconfig.json" }), json(), css(),
postcss({extensions: ['.css'],})
],
}
]
try: rollup -c -bundleconfigascjs
ожидается: A File bundle.js с кодом
Я прошу прощения, если это глупый вопрос, поскольку я не веб -разработчик. При строительстве с < /p> [code]rollup -c --bundleConfigAsCjs < /code> Я получаю следующую ошибку < /p> ./src/index.ts → dist_rollup/lib-OB-ian.js... [!] Error: Could not load C:\Users\...\file.css?inline (imported by file.ts): ENOENT: no such file or directory, open 'C:\Users\file.css?inline' at open (node:internal/fs/promises:636:25) at Object.readFile (node:internal/fs/promises:1246:14) at C:\Users\PORT_IM_3\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:20102:24 at Queue.work (C:\Users\PORT_IM_3\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:20468:32) < /code> Я считаю, что Rollup пытается Acess файл, который «.css? inline» вместо «.css», но я не уверен. Есть ли способ исправить это?import resolve from "@rollup/plugin-node-resolve"; import commonjs from "@rollup/plugin-commonjs"; import typescript from "@rollup/plugin-typescript"; import json from "@rollup/plugin-json"; import css from "rollup-plugin-import-css"; import postcss from 'rollup-plugin-postcss';
Итак, после бесчисленных часов исследования я определил, что проблема связана с моей конфигурацией Rollup в моем проекте.
Проблема в том, что по какой-то причине стили CSS не применяются к моим компонентам после того, как я импортирую свой пакет в...
I need a little explanation of how Vite JS works on the build.
I'll tell you what it's about. I have a project with a CSS, images and JS folder in the resources folder. I also have a vendors folder where I have various JS and CSS libraries as well...
Я создаю простое приложение, которое хочу запускать в браузерах. Я использую сборщик, потому что, очевидно, нет другого способа интегрировать физический движок, который я использую в свое приложение. И хотя рекламируется, что бандлеры упрощают...