-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
45 lines (41 loc) · 1.1 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
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const path = require('path');
module.exports = {
mode: "development",
optimization: {
minimize: false
},
devtool: 'source-map',
devServer: {
contentBase: './ackbas_core'
},
entry: './ackbas_core/ts/index.ts',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'ackbas_core', 'static', 'ackbas_core'),
publicPath: "/static/ackbas_core/",
library: 'ackbas'
},
resolve: {
extensions: ["*", ".webpack.js", ".web.js", ".ts", ".tsx", ".js", ".css"]
},
module: {
rules: [
// All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'.
{ test: /\.tsx?$/, loader: "awesome-typescript-loader" },
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{ test: /\.js$/, loader: "source-map-loader" },
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.ttf$/,
use: ['file-loader']
}
]
},
plugins: [
new MonacoWebpackPlugin()
]
};