Skip to content

Commit

Permalink
Merge branch 'release/v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
arefaslani committed Feb 13, 2018
2 parents 5220f62 + bdb0454 commit 4729178
Show file tree
Hide file tree
Showing 3 changed files with 425 additions and 1,028 deletions.
69 changes: 43 additions & 26 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { parsed: localEnv } = require("dotenv").config();
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");

module.exports = {
webpack: (config, { dev }) => {
webpack: (config, { dev, isServer }) => {
const conf = config;
// Fixes npm packages that depend on `fs` module
conf.node = {
Expand All @@ -18,37 +18,54 @@ module.exports = {
// For all options see https://github.com/th0r/webpack-bundle-analyzer#as-plugin
analyzerMode: dev ? "server" : "static",
analyzerHost: "127.0.0.1",
analyzerPort: 8888,
analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: false
})
);

conf.module.rules.push({
test: /\.(sc|c)ss$/,
use: [
{
loader: "emit-file-loader",
options: {
name: "dist/[path][name].[ext].js"
conf.module.rules.push(
{
test: /\.(sc|c)ss$/,
use: [
{
loader: "emit-file-loader",
options: {
name: "dist/[path][name].[ext].js"
}
},
{
loader: "babel-loader",
options: {
babelrc: false,
extends: path.resolve(__dirname, "./.babelrc")
}
},
"styled-jsx-css-loader",
{ loader: "postcss-loader", options: { sourceMap: dev } },
{
loader: "sass-loader",
options: {
sourceMap: dev
}
}
},
{
loader: "babel-loader",
options: {
babelrc: false,
extends: path.resolve(__dirname, "./.babelrc")
]
},
{
test: /\.(jpe?g|png|svg|gif)$/,
use: [
{
loader: "url-loader",
options: {
limit: 8192,
fallback: "file-loader",
publicPath: "/_next/",
outputPath: "static/images/",
name: "[name]-[hash].[ext]"
}
}
},
"styled-jsx-css-loader",
{ loader: "postcss-loader", options: { sourceMap: dev } },
{
loader: "sass-loader",
options: {
sourceMap: dev
}
}
]
});
]
}
);

return conf;
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-boilerplate",
"version": "0.9.0",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"dev": "node server",
Expand All @@ -25,7 +25,7 @@
"compression": "^1.7.1",
"dotenv": "^4.0.0",
"express": "^4.16.2",
"next": "^4.2.1",
"next": "^5.0.0",
"next-redux-saga": "^1.0.1",
"next-redux-wrapper": "^1.3.4",
"next-routes": "^1.1.0",
Expand Down
Loading

0 comments on commit 4729178

Please sign in to comment.