Add google analytics support
Add code to track performance metrics and events (password calculation).
This commit is contained in:
1 parent
6c6c02da4e
commit
d9bf30765f
12 files changed
+139
-11
No files matched your search
+12
-1
@@ -4,12 +4,20 @@ const ClosureCompilerPlugin = require('webpack-closure-compiler');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
const webpack = require('webpack');
|
||||
|
||||
function makeClosureCompiler() {
|
||||
const externDir = path.join(__dirname, "externs");
|
||||
const externs = [
|
||||
path.join(externDir, "googleAnalytics.js"),
|
||||
path.join(externDir, "performance.js")
|
||||
];
|
||||
|
||||
var pluginOptions = {
|
||||
compiler: {
|
||||
compilation_level: "ADVANCED",
|
||||
create_source_map: true
|
||||
create_source_map: true,
|
||||
externs: externs
|
||||
},
|
||||
concurrency: os.cpus().length
|
||||
};
|
||||
@@ -29,6 +37,9 @@ var plugins = [
|
||||
to: 'assets/'
|
||||
}
|
||||
]),
|
||||
new webpack.DefinePlugin({
|
||||
GOOGLE_ANALYTICS_TAG: JSON.stringify(process.env.GOOGLE_ANALYTICS_TAG)
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
minify: {
|
||||
collapseWhitespace: true,
|
||||
|
||||
Reference in new issue
Block a user