Last active
June 14, 2018 04:59
-
-
Save zinozzino/63340e6f0c36ce2cdf6dca2ea47703af to your computer and use it in GitHub Desktop.
Nuxt.js and Cordova
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// 이러면 build == generate 가 됨. | |
mode: 'spa', | |
build: { | |
// cordova에서 _ (underscore) 붙은 디렉토리는 앱 빌드에서 제외함. | |
publicPath: '/nuxt/', | |
// image asset을 제대로 불러오기 위해 필요. | |
extractCSS: false, | |
splitChunks: { | |
pages: false, | |
}, | |
}, | |
generate: { | |
'www', | |
}, | |
router: { | |
// cordova 는 relative path 만 받아들임. | |
mode: 'hash', | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"build": "nuxt build && replace '/nuxt/' 'nuxt/' www -r" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install --save-dev replace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment