-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
91 lines (79 loc) · 2.24 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
const path = require("path");
const CKEditorWebpackPlugin = require("@ckeditor/ckeditor5-dev-webpack-plugin");
const { styles } = require("@ckeditor/ckeditor5-dev-utils");
module.exports = {
transpileDependencies: [
/\bbootstrap-vue\b/,
/\bvuejs-datepicker\b/,
/\bvue-echarts\b/,
/\bresize-detector\b/,
/\bvue-c3\b/,
/\bvue-masonry\b/,
/\bvue-cropper\b/,
/\bvuedraggable\b/,
/\bdropzone\b/,
/\bmarked\b/,
/\bvue-plyr\b/,
/\bswiper\b/,
/\bdom7\b/,
/ckeditor5-[^/\\]+[/\\]src[/\\].+\.js$/,
],
configureWebpack: {
plugins: [
// CKEditor needs its own plugin to be built using webpack.
new CKEditorWebpackPlugin({
// See https://ckeditor.com/docs/ckeditor5/latest/features/ui-language.html
language: "en",
// Append translations to the file matching the `app` name.
translationsOutputFile: /app/,
}),
],
},
chainWebpack: (config) => {
const svgRule = config.module.rule("svg");
svgRule.exclude.add(path.join(__dirname, "node_modules", "@ckeditor"));
// Add "node_modules" alias
config.resolve.alias.set(
"node_modules",
path.join(__dirname, "./node_modules")
);
// Disable "prefetch" plugin since it's not properly working in some browsers
config.plugins.delete("prefetch");
config.module
.rule("cke-svg")
.test(/ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/)
.use("raw-loader")
.loader("raw-loader");
config.module
.rule("cke-css")
.test(/ckeditor5-[^/\\]+[/\\].+\.css$/)
.use("postcss-loader")
.loader("postcss-loader")
.tap(() => {
return styles.getPostCssConfig({
themeImporter: {
themePath: require.resolve("@ckeditor/ckeditor5-theme-lark"),
},
minify: true,
});
});
// Do not remove whitespaces
config.module
.rule("vue")
.use("vue-loader")
.loader("vue-loader")
.tap((options) => {
options.compilerOptions.whitespace = "preserve";
return options;
});
},
lintOnSave: false,
pluginOptions: {
i18n: {
locale: 'tr',
fallbackLocale: 'en',
localeDir: 'locales',
enableInSFC: false
}
}
};