Skip to content
Snippets Groups Projects
Commit bcd65b9d authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

chore: add build cmd

parent eedf24c7
No related branches found
No related tags found
1 merge request!1ci: add gitlab ci
...@@ -22,7 +22,7 @@ const stackProvidedLibsConfig = { ...@@ -22,7 +22,7 @@ const stackProvidedLibsConfig = {
__DEVELOPMENT__: true, __DEVELOPMENT__: true,
__STACK_ASSETS__: true, __STACK_ASSETS__: true,
__PIWIK_TRACKER_URL__: JSON.stringify('https://statweb.grandlyon.com/'), __PIWIK_TRACKER_URL__: JSON.stringify('https://statweb.grandlyon.com/'),
__PIWIK_SITEID__: 0 __PIWIK_SITEID__: 201
}) })
], ],
module: { module: {
......
'use strict'
const webpack = require('webpack')
const TerserPlugin = require('terser-webpack-plugin')
const { target } = require('cozy-scripts/config/webpack.vars')
module.exports = {
mode: 'production',
plugins: [
// use a hash as chunk id to avoid id changes of not changing chunk
new webpack.HashedModuleIdsPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'), // to compile on production mode (redux)
__IS_ALPHA__: false,
__DEVELOPMENT__: false,
__DEVTOOLS__: false,
__STACK_ASSETS__: target !== 'mobile',
__PIWIK_TRACKER_URL__: JSON.stringify('https://statweb.grandlyon.com/'),
__PIWIK_SITEID__: 201
})
],
optimization: {
minimizer: [
new TerserPlugin({
parallel: true,
// To fix a SAfari 10 bug : https://github.com/zeit/next.js/issues/5630
terserOptions: {
safari10: true
}
})
]
}
}
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
"prebuild": "yarn lint", "prebuild": "yarn lint",
"build": "yarn build:browser", "build": "yarn build:browser",
"build:browser": "cs build --browser", "build:browser": "cs build --browser",
"build-dev": "yarn run build:css && yarn run build-dev:browser",
"build-dev:browser": "cs build --browser --config app.config.js",
"build:mobile": "cs build --mobile", "build:mobile": "cs build --mobile",
"build:css": "sass -c ./src/styles:build",
"watch": "yarn watch:browser", "watch": "yarn watch:browser",
"watch:browser": "cs watch --browser", "watch:browser": "cs watch --browser",
"watch:mobile": "cs watch --mobile", "watch:mobile": "cs watch --mobile",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment