Skip to content

Instantly share code, notes, and snippets.

@zinozzino
Last active June 14, 2018 04:59
Show Gist options
  • Save zinozzino/63340e6f0c36ce2cdf6dca2ea47703af to your computer and use it in GitHub Desktop.
Save zinozzino/63340e6f0c36ce2cdf6dca2ea47703af to your computer and use it in GitHub Desktop.
Nuxt.js and Cordova
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',
},
};
{
"scripts": {
"build": "nuxt build && replace '/nuxt/' 'nuxt/' www -r"
}
}
$ npm install --save-dev replace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment