Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Jason from './some.json';
- export defaults {
- data(){ return { someArr: Jason } } }
- npm install json-loader --save
- module: {
- loaders: [
- {
- test: /.json/,
- loader: 'json',
- }
- ],
- }
- var yourJSONData= JSON.parse(Jason);
- export default {
- "foo": "bar",
- ...
- }
- import Conf from './static/app-conf.json';
- Vue.prototype.$appConfig = Conf;
- <template>
- <div>{{someText}}</div>
- </template>
- <script>
- export default {
- name: 'Something',
- components: {},
- props: {},
- data: () => ({
- someText: Vue.prototype.$appConfig.someText,
- }),
- computed: {},
- methods: {}
- };
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement