Я делаю import file from 'file.json
в Vue
компоненте, но у меня возникает проблема, когда я запускаю npm run build
, чтобы связать его с Rollup.
Выдает эту ошибку ниже, а файл неполучить в комплекте.
![rollup error](https://i.stack.imgur.com/LWThA.png)
Это то, что у меня есть в `rollup.config.js
import vue from 'rollup-plugin-vue';
import buble from 'rollup-plugin-buble';
import resolve from 'rollup-plugin-node-resolve'
import json from 'rollup-plugin-json'
export default {
input: 'src/plugin.js',
output: {
name: 'NaijaStatesLgas',
exports: 'named',
},
plugins: [
json(),
resolve({
jsnext: true,
main: true,
browser: true,
extensions: [".js", ".json"],
preferBuiltins: false,
}),
vue({
compileTemplate: true,
function
}),
buble(),
],
};
Буду признателен, если кто-то можетНаправь меня в правильном направлении.