-
Notifications
You must be signed in to change notification settings - Fork 14
/
webpack.config.ts
41 lines (38 loc) · 1 KB
/
webpack.config.ts
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
import type { Configuration } from 'webpack';
import { merge } from 'webpack-merge';
import WebpackShellPluginNext from 'webpack-shell-plugin-next';
import grafanaConfig from './.config/webpack/webpack.config';
const config = async (env): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);
return merge(baseConfig, {
module: {
rules: [
{
test: /\.hdr$/,
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'static',
publicPath: 'public/plugins/grafana-iot-twinmaker-app/static/',
},
},
],
},
resolve: {
fallback: {
util: false,
crypto: false,
path: require.resolve('path-browserify'),
},
},
plugins: [
new WebpackShellPluginNext({
onBuildEnd:{
scripts: ['npx matterport-assets dist/static/matterport'],
blocking: false,
parallel: true
}})
],
});
};
export default config;