-
Notifications
You must be signed in to change notification settings - Fork 1
프레임워크 설정
Su edited this page Sep 11, 2021
·
11 revisions
git fetch
git checkout feature/framework
npm install
npm run dev
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js"
}
- npm run dev 명령어로 webpack.dev.conf.js 를 참조 한다.
const baseWebpackConfig = require('./webpack.base.conf');
- webpack.base.conf 를 include 한다.
entry: {
app: './src/main.js'
}
- entry point 로 /src/main.js 를 지정 한다.
import App from './App';
import router from './router';
new Vue({
el: '#app',
data: {
globalState: store,
},
router,
template: '<App/>',
components: { App },
mounted() {
}
});
- App.vue 를 템플릿/컴포넌트로 사용하며 라우터를 지정한다.
<template>
<v-app>
<v-content>
<v-container style="padding:0px;" fluid>
<router-view>
<!-- <v-container fluid></v-container> -->
</router-view>
</v-container>
</v-content>
</v-app>
</template>
- router의 의해 렌더링될 view 영역을 선언한다.
import Home from '@/components/Home';
routes: [
{
path: '/',
name: 'Home',
component: Home
}
]
- 요청 path 에 따라 라우터에 의해 분기 된다.