-
Notifications
You must be signed in to change notification settings - Fork 3
/
vue.config.js
37 lines (36 loc) · 890 Bytes
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const fs = require('fs');
const packageJson = fs.readFileSync('./package.json');
const buildJson = fs.readFileSync('./build.json');
const version = JSON.parse(packageJson).version || 0;
const buildNumber = JSON.parse(buildJson).build || 0;
const webpack = require('webpack');
module.exports = {
transpileDependencies: ['vuetify'],
pages: {
index: {
entry: 'src/main.js',
title: '5e Loot Generator',
},
},
configureWebpack: {
plugins: [
new webpack.DefinePlugin({
'process.env': {
PACKAGE_VERSION: '"' + version + '"',
BUILD_NUMBER: '"' + buildNumber + '"',
},
}),
],
module: {
rules: [
{
test: /\.txt$/,
use: {
loader: 'raw-loader',
},
},
],
},
},
publicPath: process.env.NODE_ENV === 'production' ? '/loot-gen/' : '/',
};