-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
76 lines (72 loc) · 2.2 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
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
devServer: {
// proxy: 'http://images.test',
before(app) {
// use proper mime-type for wasm files
app.get('*.wasm', function(req, res, next) {
const options = {
root: '/testApps/myAzkar/public/',
dotfiles: 'deny',
headers: {
'Content-Type': 'application/wasm',
},
};
res.sendFile(req.url, options, function(err) {
if (err) {
next(err);
}
});
});
},
},
// chainWebpack: (webpackConfig) => {
// // webpackConfig.module
// // .rule('wasm')
// // .test(/.wasm$/)
// // .use('wasm-loader')
// // .loader('wasm-loader');
// },
configureWebpack: {
plugins: [
new webpack.NormalModuleReplacementPlugin(/typeorm$/, function(
result
) {
result.request = result.request.replace(
/typeorm/,
'typeorm/browser'
);
}),
// new webpack.ProvidePlugin({
// 'window.SQL': 'sql.js/dist/sql-wasm.js',
// }),
new webpack.ProvidePlugin({
'window.SQL': 'sql.js/dist/sql-wasm-debug.js',
}),
new CopyPlugin([
{
from: 'node_modules/sql.js/dist/sql-wasm-debug.wasm',
to: '../sql-wasm-debug.wasm',
},
]),
new webpack.ProvidePlugin({
'window.SQL': 'sql.js/dist/sql-wasm.js',
}),
new CopyPlugin([
{
from: 'node_modules/sql.js/dist/sql-wasm.wasm',
to: '../sql-wasm.wasm',
},
]),
],
},
pluginOptions: {
i18n: {
locale: 'ar',
fallbackLocale: 'ar',
localeDir: 'locales',
enableLegacy: false
}
}
};