-
Notifications
You must be signed in to change notification settings - Fork 6
/
vue.config.js
67 lines (65 loc) · 1.72 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
require('dotenv').config();
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { gitDescribeSync } = require('git-describe');
import.meta.env.VITE_HASH = `${Math.random().toString(36).substring(2, 8)}-${
gitDescribeSync().hash
}`;
import.meta.env.VITE_PACKAGE_VERSION = import.meta.env.npm_package_version;
import.meta.env.VITE_SENTRY_DSN_ENDPOINT =
import.meta.env.SENTRY_DSN_ENDPOINT || '';
import.meta.env.VITE_STRIPE_API = import.meta.env.VITE_STRIPE_API || '';
import.meta.env.VITE_URL_ACADEMY = import.meta.env.VITE_URL_ACADEMY || '';
module.exports = {
devServer: {
disableHostCheck: true,
},
lintOnSave: true,
runtimeCompiler: true,
outputDir: 'dist',
configureWebpack: {
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
{
loader: 'vue-style-loader',
options: {
shadowMode: true,
},
},
],
},
{
test: /\.scss$/,
use: ['sass-loader'],
},
],
},
plugins: [
new CopyWebpackPlugin(
[
{ context: 'public', to: 'index.html', from: 'index.html' },
// {
// from: 'node_modules/fundamental-styles/dist',
// to: './fundamental-styles'
// },
{
from: 'node_modules/@weni/unnnic-system/dist/img',
to: './img',
},
{
context: 'node_modules/@weni/unnnic-system/dist',
to: 'unnnic.css',
from: 'unnnic.css',
},
],
{
ignore: ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'],
debug: 'warning',
},
),
],
},
};