-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.app.common.config.js
59 lines (56 loc) · 1.61 KB
/
webpack.app.common.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
const InjectPlugin = require("webpack-inject-plugin")
const path = require("path")
const Dotenv = require('dotenv-webpack');
module.exports = () => {
return {
entry: './app/app.ts',
output: {
filename: 'dist/lbAnmeldung.js',
chunkFilename: 'dist/[name].js',
path: path.resolve(path.dirname(''), "public"),
publicPath: "/",
},
resolve: {
extensions: ['.ts', '.js'],
fallback: {
fs: false,
path: false
}
},
module: {
rules: [
{
test: /\.less$/i,
use: ["to-string-loader", "css-loader", "less-loader",],
},
{
test: /([a-zA-Z0-9\s_\\.\-\(\):])+\.static\.([a-zA-Z0-9])+$/,
use: 'raw-loader',
},
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: {
loader: 'ts-loader',
options: {
configFile: "tsconfig.app.json"
}
},
},
{
test: /\.css$/,
use: ['to-string-loader', 'css-loader'],
},
{
test: /\.pug$/,
use: ['raw-loader', 'pug-html-loader']
}
]
},
plugins: [
new Dotenv({
systemvars: true
})
]
}
};