Skip to content

Commit

Permalink
Merge pull request #2 from S64/shuma/nuxt-v1.0.0
Browse files Browse the repository at this point in the history
Release v0.0.5
  • Loading branch information
S64 authored Jan 21, 2018
2 parents bb70c6d + 9b589ea commit 7092bd9
Show file tree
Hide file tree
Showing 8 changed files with 5,945 additions and 1,178 deletions.
2,907 changes: 2,337 additions & 570 deletions packages/example-nuxt/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/example-nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "example-nuxt",
"dependencies": {
"nuxt-universal-cookies": "0.0.4"
"nuxt-universal-cookies": "0.0.5"
},
"devDependencies": {
"nuxt": "^1.0.0-rc11",
"nuxt": "^1.1.1",
"rimraf": "^2.6.2"
},
"private": true,
Expand Down
9 changes: 2 additions & 7 deletions packages/nuxt-universal-cookies/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@

const path = require('path');

module.exports = function (moduleOptions, resolve) {
module.exports = function (moduleOptions) {
const defaults = {};
const options = Object.assign({}, defaults, moduleOptions);

this.addPlugin({
src: path.resolve(__dirname, './templates/universal-cookies.plugin.ejs.js'),
fileName: 'universal-cookies.plugin.js',
options
options: options
});

this.addVendor('vue-universal-cookies');

resolve();
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export default (context) => {
Vue.use(VueUniversalCookies);
const options = <%= JSON.stringify(options) %>;
context.app.cookies = Object.assign({}, options, {
handler: context.isServer ? new NodeHttpHandler(context.req, context.res) : new BrowserHandler(),
handler: (!process.static && process.server) ? new NodeHttpHandler(context.req, context.res) : new BrowserHandler(),
});
};
Loading

0 comments on commit 7092bd9

Please sign in to comment.