@studyportals/webpack-helper 2.4.3 → 3.0.0-beta.10

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,17 +1,16 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var Plugins = /** @class */ (function () {
4
- function Plugins(plugins) {
5
- if (plugins === void 0) { plugins = []; }
6
- this.plugins = [];
7
- this.plugins = this.plugins.concat(plugins);
8
- }
9
- Plugins.prototype.addPlugin = function (plugin) {
10
- this.plugins.push(plugin);
11
- };
12
- Plugins.prototype.getPlugins = function () {
13
- return this.plugins;
14
- };
15
- return Plugins;
16
- }());
17
- exports.Plugins = Plugins;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Plugins = void 0;
4
+ class Plugins {
5
+ constructor(plugins = []) {
6
+ this.plugins = [];
7
+ this.plugins = this.plugins.concat(plugins);
8
+ }
9
+ addPlugin(plugin) {
10
+ this.plugins.push(plugin);
11
+ }
12
+ getPlugins() {
13
+ return this.plugins;
14
+ }
15
+ }
16
+ exports.Plugins = Plugins;
@@ -1,49 +1,47 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
- var JavascriptPreset = /** @class */ (function () {
5
- function JavascriptPreset() {
6
- }
7
- JavascriptPreset.prototype.getPlugins = function (filename) {
8
- return [
9
- new MiniCssExtractPlugin({
10
- filename: filename
11
- })
12
- ];
13
- };
14
- JavascriptPreset.prototype.getModule = function () {
15
- return {
16
- rules: [
17
- {
18
- test: /\.css$/,
19
- use: [
20
- MiniCssExtractPlugin.loader,
21
- 'css-loader'
22
- ]
23
- },
24
- {
25
- test: /\.scss$/,
26
- use: [
27
- MiniCssExtractPlugin.loader,
28
- 'css-loader',
29
- 'sass-loader'
30
- ]
31
- },
32
- {
33
- test: /\.jsx?$/,
34
- loader: 'babel-loader',
35
- exclude: /node_modules\/(?!@studyportals\/).*/
36
- }
37
- ]
38
- };
39
- };
40
- JavascriptPreset.prototype.getExtensions = function () {
41
- return [
42
- '*',
43
- '.js',
44
- '.json'
45
- ];
46
- };
47
- return JavascriptPreset;
48
- }());
49
- exports.JavascriptPreset = JavascriptPreset;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JavascriptPreset = void 0;
4
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
+ class JavascriptPreset {
6
+ getPlugins(filename) {
7
+ return [
8
+ new MiniCssExtractPlugin({
9
+ filename
10
+ })
11
+ ];
12
+ }
13
+ getModule() {
14
+ return {
15
+ rules: [
16
+ {
17
+ test: /\.css$/,
18
+ use: [
19
+ MiniCssExtractPlugin.loader,
20
+ 'css-loader'
21
+ ],
22
+ },
23
+ {
24
+ test: /\.scss$/,
25
+ use: [
26
+ MiniCssExtractPlugin.loader,
27
+ 'css-loader',
28
+ 'sass-loader'
29
+ ],
30
+ },
31
+ {
32
+ test: /\.jsx?$/,
33
+ loader: 'babel-loader',
34
+ exclude: /node_modules\/(?!@studyportals\/).*/
35
+ }
36
+ ]
37
+ };
38
+ }
39
+ getExtensions() {
40
+ return [
41
+ '*',
42
+ '.js',
43
+ '.json'
44
+ ];
45
+ }
46
+ }
47
+ exports.JavascriptPreset = JavascriptPreset;
@@ -1,62 +1,60 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
- var TypeScriptPreset = /** @class */ (function () {
5
- function TypeScriptPreset() {
6
- }
7
- TypeScriptPreset.prototype.getPlugins = function (filename) {
8
- return [
9
- new MiniCssExtractPlugin({
10
- filename: filename
11
- })
12
- ];
13
- };
14
- TypeScriptPreset.prototype.getModule = function () {
15
- return {
16
- rules: [
17
- {
18
- test: /\.css$/,
19
- use: [
20
- MiniCssExtractPlugin.loader,
21
- 'css-loader'
22
- ]
23
- },
24
- {
25
- test: /\.scss$/,
26
- use: [
27
- MiniCssExtractPlugin.loader,
28
- 'css-loader',
29
- 'sass-loader'
30
- ]
31
- },
32
- {
33
- test: /\.tsx?$/,
34
- loader: 'ts-loader',
35
- exclude: /node_modules\/(?!@studyportals\/).*/
36
- },
37
- {
38
- test: /\.js$/,
39
- loader: 'babel-loader',
40
- exclude: /node_modules\/(?!@studyportals\/).*/
41
- },
42
- {
43
- test: /\.(png|jpg|gif|svg)$/,
44
- loader: 'file-loader',
45
- options: {
46
- name: '[name].[ext]?[hash]'
47
- }
48
- }
49
- ]
50
- };
51
- };
52
- TypeScriptPreset.prototype.getExtensions = function () {
53
- return [
54
- '*',
55
- '.ts',
56
- '.js',
57
- '.json'
58
- ];
59
- };
60
- return TypeScriptPreset;
61
- }());
62
- exports.TypeScriptPreset = TypeScriptPreset;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypeScriptPreset = void 0;
4
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
+ class TypeScriptPreset {
6
+ getPlugins(filename) {
7
+ return [
8
+ new MiniCssExtractPlugin({
9
+ filename
10
+ })
11
+ ];
12
+ }
13
+ getModule() {
14
+ return {
15
+ rules: [
16
+ {
17
+ test: /\.css$/,
18
+ use: [
19
+ MiniCssExtractPlugin.loader,
20
+ 'css-loader'
21
+ ],
22
+ },
23
+ {
24
+ test: /\.scss$/,
25
+ use: [
26
+ MiniCssExtractPlugin.loader,
27
+ 'css-loader',
28
+ 'sass-loader'
29
+ ],
30
+ },
31
+ {
32
+ test: /\.tsx?$/,
33
+ loader: 'ts-loader',
34
+ exclude: /node_modules\/(?!@studyportals\/).*/
35
+ },
36
+ {
37
+ test: /\.js$/,
38
+ loader: 'babel-loader',
39
+ exclude: /node_modules\/(?!@studyportals\/).*/
40
+ },
41
+ {
42
+ test: /\.(png|jpg|gif|svg)$/,
43
+ loader: 'file-loader',
44
+ options: {
45
+ name: '[name].[ext]?[fullhash]'
46
+ }
47
+ }
48
+ ]
49
+ };
50
+ }
51
+ getExtensions() {
52
+ return [
53
+ '*',
54
+ '.ts',
55
+ '.js',
56
+ '.json'
57
+ ];
58
+ }
59
+ }
60
+ exports.TypeScriptPreset = TypeScriptPreset;
@@ -1,85 +1,83 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var webpack = require("webpack");
4
- var MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
- var VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
6
- var VueTypeScriptPreset = /** @class */ (function () {
7
- function VueTypeScriptPreset() {
8
- }
9
- VueTypeScriptPreset.prototype.getPlugins = function (filename) {
10
- return [
11
- new webpack.DllReferencePlugin({
12
- manifest: require("@studyportals/vue-config/dist/library.json")
13
- }),
14
- new MiniCssExtractPlugin({
15
- filename: filename
16
- }),
17
- new VueLoaderPlugin()
18
- ];
19
- };
20
- VueTypeScriptPreset.prototype.getModule = function () {
21
- return {
22
- rules: [
23
- {
24
- test: /\.css$/,
25
- use: [
26
- MiniCssExtractPlugin.loader,
27
- 'css-loader'
28
- ]
29
- },
30
- {
31
- test: /\.scss$/,
32
- use: [
33
- MiniCssExtractPlugin.loader,
34
- 'css-loader',
35
- 'sass-loader'
36
- ]
37
- },
38
- {
39
- test: /\.vue$/,
40
- loader: 'vue-loader',
41
- options: {
42
- loaders: {
43
- 'scss': [
44
- 'vue-style-loader',
45
- 'css-loader',
46
- 'sass-loader'
47
- ]
48
- }
49
- }
50
- },
51
- {
52
- test: /\.tsx?$/,
53
- loader: 'ts-loader',
54
- exclude: /node_modules\/(?!@studyportals\/).*/,
55
- options: {
56
- appendTsSuffixTo: [/\.vue$/]
57
- }
58
- },
59
- {
60
- test: /\.js$/,
61
- loader: 'babel-loader',
62
- exclude: /node_modules\/(?!@studyportals\/).*/
63
- },
64
- {
65
- test: /\.(png|jpg|gif|svg)$/,
66
- loader: 'file-loader',
67
- options: {
68
- name: '[name].[ext]?[hash]'
69
- }
70
- },
71
- ]
72
- };
73
- };
74
- VueTypeScriptPreset.prototype.getExtensions = function () {
75
- return [
76
- '*',
77
- '.ts',
78
- '.js',
79
- '.vue',
80
- '.json'
81
- ];
82
- };
83
- return VueTypeScriptPreset;
84
- }());
85
- exports.VueTypeScriptPreset = VueTypeScriptPreset;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VueTypeScriptPreset = void 0;
4
+ const webpack = require("webpack");
5
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6
+ const VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
7
+ class VueTypeScriptPreset {
8
+ getPlugins(filename) {
9
+ return [
10
+ new webpack.DllReferencePlugin({
11
+ manifest: require("@studyportals/vue-config/dist/vue3_library.json")
12
+ }),
13
+ new MiniCssExtractPlugin({
14
+ filename
15
+ }),
16
+ new VueLoaderPlugin()
17
+ ];
18
+ }
19
+ getModule() {
20
+ return {
21
+ rules: [
22
+ {
23
+ test: /\.css$/,
24
+ use: [
25
+ MiniCssExtractPlugin.loader,
26
+ 'css-loader'
27
+ ],
28
+ },
29
+ {
30
+ test: /\.scss$/,
31
+ use: [
32
+ MiniCssExtractPlugin.loader,
33
+ 'css-loader',
34
+ 'sass-loader'
35
+ ],
36
+ },
37
+ {
38
+ test: /\.vue$/,
39
+ loader: 'vue-loader',
40
+ options: {
41
+ loaders: {
42
+ 'scss': [
43
+ 'vue-style-loader',
44
+ 'css-loader',
45
+ 'sass-loader'
46
+ ]
47
+ }
48
+ }
49
+ },
50
+ {
51
+ test: /\.tsx?$/,
52
+ loader: 'ts-loader',
53
+ exclude: /node_modules\/(?!@studyportals\/).*/,
54
+ options: {
55
+ appendTsSuffixTo: [/\.vue$/]
56
+ },
57
+ },
58
+ {
59
+ test: /\.js$/,
60
+ loader: 'babel-loader',
61
+ exclude: /node_modules\/(?!@studyportals\/).*/
62
+ },
63
+ {
64
+ test: /\.(png|jpg|gif|svg)$/,
65
+ loader: 'file-loader',
66
+ options: {
67
+ name: '[name].[ext]?[fullhash]'
68
+ }
69
+ },
70
+ ]
71
+ };
72
+ }
73
+ getExtensions() {
74
+ return [
75
+ '*',
76
+ '.ts',
77
+ '.js',
78
+ '.vue',
79
+ '.json'
80
+ ];
81
+ }
82
+ }
83
+ exports.VueTypeScriptPreset = VueTypeScriptPreset;