powerbi-visuals-tools 5.0.1 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,145 +0,0 @@
1
-
2
- import { getRootPath, readJsonFromRoot } from './utils.js';
3
- import { LocalizationLoader } from "powerbi-visuals-webpack-plugin";
4
- import MiniCssExtractPlugin from "mini-css-extract-plugin";
5
- import TerserPlugin from "terser-webpack-plugin";
6
- import path from "path";
7
- import webpack from "webpack";
8
-
9
- const config = readJsonFromRoot("/config.json");
10
- const rootPath = getRootPath();
11
-
12
- const webpackConfig = {
13
- entry: {
14
- 'visual.js': ['./src/visual.ts']
15
- },
16
- target: 'web',
17
- devtool: false,
18
- mode: "production",
19
- optimization: {
20
- minimizer: [
21
- new TerserPlugin({
22
- parallel: true,
23
- terserOptions: {}
24
- })
25
- ],
26
- minimize: false,
27
- concatenateModules: false
28
- },
29
- performance: {
30
- maxEntrypointSize: 1024000,
31
- maxAssetSize: 1024000,
32
- hints: false
33
- },
34
- module: {
35
- rules: [
36
- {
37
- parser: {
38
- amd: false
39
- }
40
- },
41
- {
42
- test: /\.json$/,
43
- loader: path.resolve(rootPath, "node_modules", "json-loader"),
44
- type: "javascript/auto"
45
- },
46
- {
47
- test: /(\.less)|(\.css)$/,
48
- use: [
49
- {
50
- loader: MiniCssExtractPlugin.loader
51
- },
52
- {
53
- loader: path.resolve(rootPath, "node_modules", "css-loader")
54
- },
55
- {
56
- loader: path.resolve(rootPath, "node_modules", "less-loader"),
57
- options: {
58
- lessOptions: {
59
- paths: [path.resolve(rootPath, 'node_modules')]
60
- }
61
- }
62
- }
63
- ]
64
- },
65
- {
66
- test: /\.(woff|ttf|ico|woff2|jpg|jpeg|png|webp|gif|svg|eot)$/i,
67
- type: 'asset/inline'
68
- },
69
- {
70
- test: /powerbiGlobalizeLocales\.js$/,
71
- loader: LocalizationLoader
72
- }
73
- ]
74
- },
75
- externals: {
76
- "powerbi-visuals-api": 'null'
77
- },
78
- resolve: {
79
- extensions: ['.tsx', '.ts', '.jsx', '.js', '.css'],
80
- fallback: {
81
- assert: path.resolve(rootPath, "node_modules", "assert"),
82
- buffer: path.resolve(rootPath, "node_modules", "buffer"),
83
- console: path.resolve(rootPath, "node_modules", "console-browserify"),
84
- constants: path.resolve(rootPath, "node_modules", "constants-browserify"),
85
- crypto: path.resolve(rootPath, "node_modules", "crypto-browserify"),
86
- domain: path.resolve(rootPath, "node_modules", "domain-browser"),
87
- events: path.resolve(rootPath, "node_modules", "events"),
88
- http: path.resolve(rootPath, "node_modules", "stream-http"),
89
- https: path.resolve(rootPath, "node_modules", "https-browserify"),
90
- os: path.resolve(rootPath, "node_modules", "os-browserify"),
91
- path: path.resolve(rootPath, "node_modules", "path-browserify"),
92
- punycode: path.resolve(rootPath, "node_modules", "punycode"),
93
- process: path.resolve(rootPath, "node_modules", "process"),
94
- querystring: path.resolve(rootPath, "node_modules", "querystring-es3"),
95
- stream: path.resolve(rootPath, "node_modules", "stream-browserify"),
96
- _stream_duplex: path.resolve(rootPath, "node_modules", "readable-stream"),
97
- _stream_passthrough: path.resolve(rootPath, "node_modules", "readable-stream"),
98
- _stream_readable: path.resolve(rootPath, "node_modules", "readable-stream"),
99
- _stream_transform: path.resolve(rootPath, "node_modules", "readable-stream"),
100
- _stream_writable: path.resolve(rootPath, "node_modules", "readable-stream"),
101
- string_decoder: path.resolve(rootPath, "node_modules", "string_decoder"),
102
- sys: path.resolve(rootPath, "node_modules", "util"),
103
- timers: path.resolve(rootPath, "node_modules", "timers-browserify"),
104
- tty: path.resolve(rootPath, "node_modules", "tty-browserify"),
105
- url: path.resolve(rootPath, "node_modules", "url"),
106
- util: path.resolve(rootPath, "node_modules", "util"),
107
- vm: path.resolve(rootPath, "node_modules", "vm-browserify"),
108
- zlib: path.resolve(rootPath, "node_modules", "browserify-zlib")
109
- }
110
- },
111
- output: {
112
- path: null,
113
- publicPath: 'assets',
114
- filename: "[name]"
115
- },
116
- devServer: {
117
- allowedHosts: "all",
118
- static: {
119
- directory: null
120
- },
121
- compress: true,
122
- port: 8080,
123
- hot: false,
124
- server: 'https',
125
- headers: {
126
- "access-control-allow-origin": "*",
127
- "cache-control": "public, max-age=0"
128
- }
129
- },
130
- watchOptions: {
131
- ignored: ['node_modules", "**']
132
- },
133
- plugins: [
134
- new webpack.ProvidePlugin({
135
- Buffer: ["buffer", "Buffer"],
136
- process: "process/browser"
137
- }),
138
- new MiniCssExtractPlugin({
139
- filename: config.build.css,
140
- chunkFilename: "[id].css"
141
- })
142
- ]
143
- };
144
-
145
- export default webpackConfig;