2021-01-15 23:24:15 +11:00
|
|
|
const Dotenv = require('dotenv-webpack');
|
2021-04-10 16:34:51 +10:00
|
|
|
var WebpackAutoInject = require('webpack-auto-inject-version');
|
|
|
|
|
2021-01-15 23:24:15 +11:00
|
|
|
module.exports = {
|
2021-01-16 17:06:35 +11:00
|
|
|
devServer: {
|
2021-04-10 16:34:51 +10:00
|
|
|
proxy: 'http://localhost:23981',
|
|
|
|
disableHostCheck: true, // dev.kaverti.flowinity
|
2021-01-16 17:06:35 +11:00
|
|
|
},
|
|
|
|
|
|
|
|
publicPath: '/',
|
2021-01-15 23:24:15 +11:00
|
|
|
productionSourceMap: false,
|
2021-01-16 17:06:35 +11:00
|
|
|
|
2021-01-15 23:24:15 +11:00
|
|
|
configureWebpack: {
|
|
|
|
plugins: [
|
2021-04-10 16:34:51 +10:00
|
|
|
new Dotenv(),
|
|
|
|
new WebpackAutoInject({
|
|
|
|
// specify the name of the tag in the outputed files eg
|
|
|
|
// bundle.js: [SHORT] Version: 0.13.36 ...
|
|
|
|
SHORT: 'Version: 1.0.0-prerelease5',
|
|
|
|
SILENT: false,
|
|
|
|
PACKAGE_JSON_PATH: './package.json',
|
|
|
|
PACKAGE_JSON_INDENT: 4,
|
|
|
|
components: {
|
|
|
|
AutoIncreaseVersion: true,
|
|
|
|
InjectAsComment: true,
|
|
|
|
InjectByTag: true
|
|
|
|
},
|
|
|
|
componentsOptions: {
|
|
|
|
AutoIncreaseVersion: {
|
|
|
|
runInWatchMode: false // it will increase version with every single build!
|
|
|
|
},
|
|
|
|
InjectAsComment: {
|
|
|
|
tag: 'Version: {version} - {date}',
|
|
|
|
dateFormat: 'h:MM:ss TT', // change timezone: `UTC:h:MM:ss` or `GMT:h:MM:ss`
|
|
|
|
multiLineCommentType: false, // use `/** */` instead of `//` as comment block
|
|
|
|
},
|
|
|
|
InjectByTag: {
|
|
|
|
fileRegex: /\.+/,
|
|
|
|
// regexp to find [AIV] tag inside html, if you tag contains unallowed characters you can adjust the regex
|
|
|
|
// but also you can change [AIV] tag to anything you want
|
|
|
|
AIVTagRegexp: /(\[AIV])(([a-zA-Z{} ,:;!()_@\-"'\\\/])+)(\[\/AIV])/g,
|
|
|
|
dateFormat: 'h:MM:ss TT'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
LOGS_TEXT: {
|
|
|
|
AIS_START: 'Kaverti AIV started'
|
|
|
|
}
|
|
|
|
})
|
2021-01-15 23:24:15 +11:00
|
|
|
]
|
2021-01-16 17:06:35 +11:00
|
|
|
},
|
|
|
|
|
|
|
|
pluginOptions: {
|
|
|
|
i18n: {
|
|
|
|
locale: 'en',
|
|
|
|
fallbackLocale: 'debug',
|
|
|
|
localeDir: 'locales',
|
|
|
|
enableInSFC: false
|
|
|
|
}
|
2021-01-15 23:24:15 +11:00
|
|
|
}
|
|
|
|
}
|