hi,
i want to use swiper in my project.
how?
in app.js, import 'swiper/css';
indicates an error.
yarn dev
yarn run v1.22.17
$ bud dev
✘ Module parse failed: Unexpected character '@' (13:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See
https://webpack.js.org/concepts#loaders
| */
|
> @font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64,
...
css import doesn’t work either. (@import url('~swiper/css');
)
yarn dev
yarn run v1.22.17
$ bud dev
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
✘ Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Failed to find '~swiper/css'
in [
./resources/styles
]
at /xy/public/wp-content/themes/xy/node_modules/postcss-import/lib/resolve-id.js:35:13
at async LazyResult.runAsync (/xy/public/wp-content/themes/xy/node_modules/postcss/lib/lazy-result.js:396:11)
at async Object.loader (/xy/public/wp-content/themes/xy/node_modules/postcss-loader/dist/index.js:97:14)
what do i do wrong?
sage 10 latest.
thanks for the help!