I try to use lottie-vuejs in Gridsome but I don't succeed to import my animation file stored in src/assets/animations/success.json. I get a 404 error.
In my template I use lottie like that :
<template>
</Layout>
<lottie-animation path="./assets/animations/success.json" />
</Layout>
</template>
In my gridsome file, I have tried to import my file with Webpack but it still not working.
const path = require('path');
module.exports = {
configureWebpack: {
module: {
rules: [
{
type: 'javascript/auto',
test: /\.json$/,
include: [path.resolve(__dirname, 'src/assets/animations')],
use: [
{
loader: 'file-loader',
},
],
},
],
},
},