firestudio
Version:
CLI for developing apps with NextJS and Firebase
45 lines (40 loc) • 1.34 kB
JavaScript
const { withSPA } = require('next-spa');
const path = require('path');
const withCSS = require('@zeit/next-css');
const withSass = require('@zeit/next-sass');
const firebaseConfig = require('./config/firebase.config');
const nextConfig = withSass(withCSS(withSPA({
distDir: './dist/build',
publicRuntimeConfig: {
FIREBASE: firebaseConfig,
},
nextSPA: {
fallback: '200.html',
},
firestudio: {
projectId: firebaseConfig.projectId,
},
webpack(config) {
config.resolve.alias = { // eslint-disable-line no-param-reassign
...config.resolve.alias || {},
'@elements': path.resolve(__dirname, './src/app/components/elements'),
'@partials': path.resolve(__dirname, './src/app/components/partials'),
'@templates': path.resolve(__dirname, './src/app/components/templates'),
'@hocs': path.resolve(__dirname, './src/app/hocs'),
'@config': path.resolve(__dirname, './src/app/config'),
'@store': path.resolve(__dirname, './src/app/store'),
};
config.module.rules.push(
{
test: /\.(eot|woff|woff2|ttf|svg|bmp|png|jpe?g|gif)$/,
loader: require.resolve('url-loader'),
options: {
limit: 10000,
name: 'static/media/[name].[hash:8].[ext]',
},
},
);
return config;
},
})));
module.exports = nextConfig;