16
|
1 import path from "path";
|
|
2 import webpack from 'webpack';
|
|
3 import { CheckerPlugin } from 'awesome-typescript-loader';
|
|
4
|
|
5 const resolveConfig = {
|
|
6 alias: {
|
|
7 'webpack-plugin-serve/client': './node_modules/webpack-plugin-serve/client.js',
|
|
8 },
|
|
9 extensions: ['.ts', '.js', '.json']
|
|
10 };
|
|
11
|
|
12 const moduleConfig = {
|
|
13 rules: [
|
|
14 {
|
|
15 test: /\.ts$/,
|
|
16 use: ['awesome-typescript-loader'],
|
|
17 exclude: /node_modules/
|
|
18 },
|
|
19 {
|
|
20 test: /\.css$/i,
|
|
21 use: ['file-loader']
|
|
22 },
|
|
23 {
|
|
24 test: /zzzzz\.js$/, use: {
|
|
25 loader: 'babel-loader',
|
|
26 options: {
|
|
27 }
|
|
28 }
|
|
29 }
|
|
30 ]
|
|
31 };
|
|
32 const pluginsConfig = [
|
|
33 new CheckerPlugin()
|
|
34 ];
|
|
35 export default {
|
|
36 name: "test",
|
|
37 mode: "development",
|
|
38 entry: [
|
|
39 "./src/json_ld_quads_test.ts"
|
|
40 ],
|
|
41 output: {
|
|
42 filename: "test.bundle.js",
|
|
43 path: path.resolve(__dirname, 'build')
|
|
44 },
|
|
45
|
|
46 resolve: resolveConfig,
|
|
47 module: moduleConfig,
|
|
48 plugins: pluginsConfig
|
|
49 };
|
|
50
|