forked from EtchUK/Etch.OrchardCore.Fields
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
71 lines (70 loc) · 2.03 KB
/
webpack.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
const CopyPlugin = require('copy-webpack-plugin');
const path = require('path');
module.exports = {
entry: {
colour: './Assets/Colour/js/index.ts',
dictionary: './Assets/Dictionary/js/index.ts',
responsiveMedia: './Assets/ResponsiveMedia/js/index.ts',
values: './Assets/Values/js/index.ts',
},
mode: 'development',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
alias: {
vue$: 'vue/dist/vue.esm.js',
},
},
externals: {
bootstrap: 'bootstrap',
jquery: 'jQuery',
vue: 'Vue',
},
output: {
filename: '[name]/admin.js',
path: path.resolve(__dirname, './wwwroot/Scripts/'),
},
plugins: [
new CopyPlugin([
{
from: './node_modules/ace-builds/src-noconflict/ace.js',
to: path.resolve(
__dirname,
'./wwwroot/Scripts/code/ace/ace.js'
),
},
{
from:
'./node_modules/ace-builds/src-noconflict/mode-javascript.js',
to: path.resolve(
__dirname,
'./wwwroot/Scripts/code/ace/mode-javascript.js'
),
},
{
from:
'./node_modules/ace-builds/src-noconflict/theme-crimson_editor.js',
to: path.resolve(
__dirname,
'./wwwroot/Scripts/code/ace/theme-crimson_editor.js'
),
},
{
from:
'./node_modules/ace-builds/src-noconflict/worker-javascript.js',
to: path.resolve(
__dirname,
'./wwwroot/Scripts/code/ace/worker-javascript.js'
),
},
]),
],
};