powerbi-visuals-tools 5.0.0 → 5.0.2

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