Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
chore: fixed now.sh deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasconstantino committed Mar 20, 2019
1 parent eacf2cf commit 02c9c4a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
13 changes: 11 additions & 2 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
README.md
build
# local files
temp
docs

# package manager
node_modules

# generated files
coverage
bundles
.docz
storybook-static
7 changes: 3 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const compose = require('next-compose')
const withPlugins = require('next-compose-plugins')
const withBundleAnalyzer = require('@zeit/next-bundle-analyzer')

const webpack = require('./config/webpack/webpack.next')

// webpack bundle analyzer.
Expand All @@ -26,7 +25,7 @@ const analyzer = [
// core NextJS config.
const core = {
webpack,
target: 'server',
target: process.env.DEPLOYING ? 'serverless' : 'server',
distDir: 'build/client',
serverRuntimeConfig: {},
// available to both client and server-side.
Expand All @@ -35,4 +34,4 @@ const core = {
}
}

module.exports = compose([analyzer, core])
module.exports = withPlugins([analyzer, core])
2 changes: 1 addition & 1 deletion now.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 2,
"name": "next-on-drupal",
"builds": [{ "src": "package.json", "use": "@now/next" }]
"builds": [{ "src": "next.config.js", "use": "@now/next" }]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build:next": "next build",
"build:server": "webpack --config config/webpack/webpack.server.js",
"clean": "rm -Rf ./build && rm -Rf .next && rm -Rf bundles && rm -Rf ./node_modules/.cache",
"deploy": "DEPLOYING=1 now",
"dev": "yarn clean && yarn build:server && concurrently \"yarn build:server --watch\" \"DEBUG=next-on-drupal:* nodemon ./build/server.js -w ./build/server.js\"",
"dev:next": "node ./build/server.js",
"dev:server": "yarn build && concurrently \"yarn build:server --watch\" \"NODE_ENV=production DEBUG=next-on-drupal:* nodemon ./build/server.js -w ./build/server.js\"",
Expand Down Expand Up @@ -88,7 +89,7 @@
"husky": "^1.3.1",
"limax": "^1.7.0",
"lint-staged": "^8.1.0",
"next-compose": "^0.0.2",
"next-compose-plugins": "^2.1.1",
"nodemon": "^1.18.10",
"parse-gitignore": "^1.0.1",
"prettier-eslint-cli": "^4.7.1",
Expand Down

0 comments on commit 02c9c4a

Please sign in to comment.