@studyportals/webpack-helper 2.5.3-1 → 2.6.1-beta.1
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.
- package/package.json +3 -3
- package/src/defaults/development.config.js +0 -7
- package/src/defaults/production.config.js +0 -58
- package/src/enums/mode.js +0 -7
- package/src/enums/preset.js +0 -8
- package/src/factories/configuration-factory.js +0 -9
- package/src/interfaces/bob.interface.js +0 -2
- package/src/interfaces/entry.interface.js +0 -2
- package/src/interfaces/entrypoint.interface.js +0 -2
- package/src/interfaces/output.interface.js +0 -2
- package/src/interfaces/preset.interface.js +0 -2
- package/src/main.js +0 -5
- package/src/model/configuration.js +0 -119
- package/src/model/entry.js +0 -11
- package/src/model/module.js +0 -16
- package/src/model/output.js +0 -44
- package/src/model/plugins.js +0 -15
- package/src/presets/javascript.preset.js +0 -46
- package/src/presets/typescript.preset.js +0 -59
- package/src/presets/vue-typescript.preset.js +0 -82
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studyportals/webpack-helper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1-beta.1",
|
|
4
4
|
"description": "A collection of standard configurations and helpers for webpack.",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"css-loader": "^3.4.2",
|
|
38
38
|
"file-loader": "^6.0.0",
|
|
39
39
|
"mini-css-extract-plugin": "^0.9.0",
|
|
40
|
-
"node-sass": "^4.13.1",
|
|
41
40
|
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
|
42
41
|
"path": "^0.12.7",
|
|
43
|
-
"sass
|
|
42
|
+
"sass": "^1.51.0",
|
|
43
|
+
"sass-loader": "^10.2.1",
|
|
44
44
|
"terser-webpack-plugin": "^2.3.4",
|
|
45
45
|
"ts-loader": "^6.2.1",
|
|
46
46
|
"typescript": "^3.7.2",
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const webpack = require('webpack');
|
|
4
|
-
const TerserPlugin = require('terser-webpack-plugin');
|
|
5
|
-
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
|
6
|
-
const DllAvailabilityTracker = require('@studyportals/dll-availability-tracker');
|
|
7
|
-
exports.ProductionConfig = (bobConfig) => {
|
|
8
|
-
let dllDependencies = ['library'];
|
|
9
|
-
if (bobConfig !== null && bobConfig.hasOwnProperty('dllPackages')) {
|
|
10
|
-
bobConfig.dllPackages.forEach((dependency) => dllDependencies.push(dependency.manifest.name));
|
|
11
|
-
}
|
|
12
|
-
return {
|
|
13
|
-
plugins: [
|
|
14
|
-
new webpack.LoaderOptionsPlugin({
|
|
15
|
-
minimize: true
|
|
16
|
-
}),
|
|
17
|
-
new webpack.DefinePlugin({
|
|
18
|
-
'process.env': {
|
|
19
|
-
NODE_ENV: '"production"'
|
|
20
|
-
}
|
|
21
|
-
}),
|
|
22
|
-
new OptimizeCSSAssetsPlugin({
|
|
23
|
-
cssProcessorPluginOptions: {
|
|
24
|
-
preset: [
|
|
25
|
-
'default',
|
|
26
|
-
{
|
|
27
|
-
discardComments: {
|
|
28
|
-
removeAll: true
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
}),
|
|
34
|
-
new DllAvailabilityTracker({
|
|
35
|
-
dependencies: dllDependencies || []
|
|
36
|
-
})
|
|
37
|
-
],
|
|
38
|
-
optimization: {
|
|
39
|
-
minimize: true,
|
|
40
|
-
minimizer: [
|
|
41
|
-
new TerserPlugin({
|
|
42
|
-
sourceMap: true,
|
|
43
|
-
parallel: true,
|
|
44
|
-
extractComments: false,
|
|
45
|
-
terserOptions: {
|
|
46
|
-
output: {
|
|
47
|
-
comments: false
|
|
48
|
-
},
|
|
49
|
-
compress: {
|
|
50
|
-
drop_console: true,
|
|
51
|
-
passes: 5
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
};
|
package/src/enums/mode.js
DELETED
package/src/enums/preset.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var Preset;
|
|
4
|
-
(function (Preset) {
|
|
5
|
-
Preset["VUE_TYPESCRIPT"] = "vue-typescript";
|
|
6
|
-
Preset["TYPESCRIPT"] = "typescript";
|
|
7
|
-
Preset["JAVASCRIPT"] = "javascript";
|
|
8
|
-
})(Preset = exports.Preset || (exports.Preset = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configuration_1 = require("../model/configuration");
|
|
4
|
-
class ConfigurationFactory {
|
|
5
|
-
create(options) {
|
|
6
|
-
return new configuration_1.Configuration(options);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
exports.ConfigurationFactory = ConfigurationFactory;
|
package/src/main.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configuration_factory_1 = require("./factories/configuration-factory");
|
|
4
|
-
const configurationFactory = new configuration_factory_1.ConfigurationFactory();
|
|
5
|
-
module.exports = configurationFactory;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const entry_1 = require("./entry");
|
|
4
|
-
const output_1 = require("./output");
|
|
5
|
-
const plugins_1 = require("./plugins");
|
|
6
|
-
const module_1 = require("./module");
|
|
7
|
-
const preset_1 = require("../enums/preset");
|
|
8
|
-
const vue_typescript_preset_1 = require("../presets/vue-typescript.preset");
|
|
9
|
-
const typescript_preset_1 = require("../presets/typescript.preset");
|
|
10
|
-
const javascript_preset_1 = require("../presets/javascript.preset");
|
|
11
|
-
const mode_1 = require("../enums/mode");
|
|
12
|
-
const production_config_1 = require("../defaults/production.config");
|
|
13
|
-
const development_config_1 = require("../defaults/development.config");
|
|
14
|
-
const ManifestGenerator = require("@studyportals/bob-manifest-generator").ManifestGenerator;
|
|
15
|
-
const DllReferencePlugin = require("@studyportals/bob-manifest-generator").DllReferencePlugin;
|
|
16
|
-
const merge = require("webpack-merge");
|
|
17
|
-
class Configuration {
|
|
18
|
-
constructor(options) {
|
|
19
|
-
this.bob = options.bob || null;
|
|
20
|
-
this.entry = new entry_1.Entry(options.entry);
|
|
21
|
-
this.output = new output_1.Output(options.output);
|
|
22
|
-
this.extensions = options.extensions || [];
|
|
23
|
-
this.preset = options.preset || null;
|
|
24
|
-
this.hash = options.output.hash || false;
|
|
25
|
-
this.plugins = new plugins_1.Plugins(options.plugins);
|
|
26
|
-
this.module = new module_1.Module(options.module);
|
|
27
|
-
this.commonConfig = options.common || {};
|
|
28
|
-
this.environmentSpecificConfig = {
|
|
29
|
-
[mode_1.Mode.DEVELOPMENT]: merge([options[mode_1.Mode.DEVELOPMENT], development_config_1.DevelopmentConfig]) || development_config_1.DevelopmentConfig,
|
|
30
|
-
[mode_1.Mode.PRODUCTION]: merge([options[mode_1.Mode.PRODUCTION], production_config_1.ProductionConfig(this.bob)]) || production_config_1.ProductionConfig(this.bob)
|
|
31
|
-
};
|
|
32
|
-
this.fileName = options.output.fileName || "[name]";
|
|
33
|
-
this.detectPresets();
|
|
34
|
-
}
|
|
35
|
-
get(mode) {
|
|
36
|
-
return merge({
|
|
37
|
-
entry: this.entry.getEntry(),
|
|
38
|
-
output: this.output.getOutput(),
|
|
39
|
-
plugins: this.plugins.getPlugins(),
|
|
40
|
-
module: this.module.getModule(),
|
|
41
|
-
resolve: {
|
|
42
|
-
extensions: this.extensions
|
|
43
|
-
},
|
|
44
|
-
performance: {
|
|
45
|
-
hints: false
|
|
46
|
-
},
|
|
47
|
-
optimization: {
|
|
48
|
-
minimize: false
|
|
49
|
-
},
|
|
50
|
-
devtool: 'source-map'
|
|
51
|
-
}, this.getBobConfig(), this.commonConfig, this.getEnvironmentSpecificConfig(mode), { mode });
|
|
52
|
-
}
|
|
53
|
-
detectPresets() {
|
|
54
|
-
switch (this.preset) {
|
|
55
|
-
case preset_1.Preset.VUE_TYPESCRIPT:
|
|
56
|
-
this.injectPreset(new vue_typescript_preset_1.VueTypeScriptPreset());
|
|
57
|
-
break;
|
|
58
|
-
case preset_1.Preset.TYPESCRIPT:
|
|
59
|
-
this.injectPreset(new typescript_preset_1.TypeScriptPreset());
|
|
60
|
-
break;
|
|
61
|
-
case preset_1.Preset.JAVASCRIPT:
|
|
62
|
-
this.injectPreset(new javascript_preset_1.JavascriptPreset());
|
|
63
|
-
break;
|
|
64
|
-
default:
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
injectPreset(preset) {
|
|
69
|
-
const plugins = preset.getPlugins(this.getCSSFileName());
|
|
70
|
-
const module = preset.getModule();
|
|
71
|
-
plugins.forEach(plugin => {
|
|
72
|
-
this.plugins.addPlugin(plugin);
|
|
73
|
-
});
|
|
74
|
-
this.extensions = this.extensions.concat(preset.getExtensions());
|
|
75
|
-
this.module.setModule(module);
|
|
76
|
-
}
|
|
77
|
-
getEnvironmentSpecificConfig(mode) {
|
|
78
|
-
return this.environmentSpecificConfig[mode];
|
|
79
|
-
}
|
|
80
|
-
getBobConfig() {
|
|
81
|
-
if (this.bob === null) {
|
|
82
|
-
return {};
|
|
83
|
-
}
|
|
84
|
-
let dllPackages = [];
|
|
85
|
-
if (typeof this.bob.dllPackages !== 'undefined'
|
|
86
|
-
&& this.bob.dllPackages.length > 0) {
|
|
87
|
-
dllPackages = this.getBobDllDependencies();
|
|
88
|
-
delete this.bob.dllPackages;
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
plugins: [
|
|
92
|
-
new ManifestGenerator(this.bob)
|
|
93
|
-
].concat(dllPackages)
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
getBobDllDependencies() {
|
|
97
|
-
let dependencies = [];
|
|
98
|
-
if (typeof this.bob.dllPackages === 'undefined')
|
|
99
|
-
return dependencies;
|
|
100
|
-
this.bob.dllPackages.forEach((dependency) => {
|
|
101
|
-
dependencies.push(new DllReferencePlugin({
|
|
102
|
-
name: dependency.name,
|
|
103
|
-
manifest: dependency.manifest
|
|
104
|
-
}));
|
|
105
|
-
});
|
|
106
|
-
return dependencies;
|
|
107
|
-
}
|
|
108
|
-
getCSSFileName() {
|
|
109
|
-
var _a;
|
|
110
|
-
const fileName = (_a = this.fileName, (_a !== null && _a !== void 0 ? _a : `style`));
|
|
111
|
-
if (this.hash === false
|
|
112
|
-
|| typeof this.hash.css !== 'undefined'
|
|
113
|
-
&& this.hash.css === false) {
|
|
114
|
-
return `${fileName}.css`;
|
|
115
|
-
}
|
|
116
|
-
return `${fileName}.[hash].css`;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
exports.Configuration = Configuration;
|
package/src/model/entry.js
DELETED
package/src/model/module.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const merge = require("webpack-merge");
|
|
4
|
-
class Module {
|
|
5
|
-
constructor(module = {}) {
|
|
6
|
-
this.module = {};
|
|
7
|
-
this.module = merge(this.module, module);
|
|
8
|
-
}
|
|
9
|
-
setModule(module) {
|
|
10
|
-
this.module = merge(this.module, module);
|
|
11
|
-
}
|
|
12
|
-
getModule() {
|
|
13
|
-
return this.module;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.Module = Module;
|
package/src/model/output.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class Output {
|
|
4
|
-
constructor(outputConfig) {
|
|
5
|
-
this.path = outputConfig.path;
|
|
6
|
-
this.publicPath = outputConfig.publicPath || null;
|
|
7
|
-
this.library = outputConfig.library || null;
|
|
8
|
-
this.addHash = this.shouldAddHash(outputConfig.hash),
|
|
9
|
-
this.fileName = outputConfig.fileName || "[name]";
|
|
10
|
-
this.crossOriginLoading = outputConfig.crossOriginLoading || null;
|
|
11
|
-
}
|
|
12
|
-
getOutput() {
|
|
13
|
-
let output = {
|
|
14
|
-
path: this.path,
|
|
15
|
-
filename: this.getFileName()
|
|
16
|
-
};
|
|
17
|
-
if (this.publicPath !== null) {
|
|
18
|
-
output.publicPath = this.publicPath;
|
|
19
|
-
}
|
|
20
|
-
if (this.library !== null) {
|
|
21
|
-
output.library = this.library;
|
|
22
|
-
}
|
|
23
|
-
if (this.crossOriginLoading !== null) {
|
|
24
|
-
output.crossOriginLoading = this.crossOriginLoading;
|
|
25
|
-
}
|
|
26
|
-
return output;
|
|
27
|
-
}
|
|
28
|
-
getFileName() {
|
|
29
|
-
let fileName = this.addHash === true ? `${this.fileName}.[hash].js` : `${this.fileName}.js`;
|
|
30
|
-
return fileName;
|
|
31
|
-
}
|
|
32
|
-
shouldAddHash(hashConfig) {
|
|
33
|
-
if (typeof hashConfig === 'undefined') {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
if (typeof hashConfig.js !== 'undefined'
|
|
37
|
-
&& hashConfig.js === false
|
|
38
|
-
|| hashConfig === false) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.Output = Output;
|
package/src/model/plugins.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class Plugins {
|
|
4
|
-
constructor(plugins = []) {
|
|
5
|
-
this.plugins = [];
|
|
6
|
-
this.plugins = this.plugins.concat(plugins);
|
|
7
|
-
}
|
|
8
|
-
addPlugin(plugin) {
|
|
9
|
-
this.plugins.push(plugin);
|
|
10
|
-
}
|
|
11
|
-
getPlugins() {
|
|
12
|
-
return this.plugins;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.Plugins = Plugins;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
|
-
class JavascriptPreset {
|
|
5
|
-
getPlugins(filename) {
|
|
6
|
-
return [
|
|
7
|
-
new MiniCssExtractPlugin({
|
|
8
|
-
filename
|
|
9
|
-
})
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
getModule() {
|
|
13
|
-
return {
|
|
14
|
-
rules: [
|
|
15
|
-
{
|
|
16
|
-
test: /\.css$/,
|
|
17
|
-
use: [
|
|
18
|
-
MiniCssExtractPlugin.loader,
|
|
19
|
-
'css-loader'
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
test: /\.scss$/,
|
|
24
|
-
use: [
|
|
25
|
-
MiniCssExtractPlugin.loader,
|
|
26
|
-
'css-loader',
|
|
27
|
-
'sass-loader'
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
test: /\.jsx?$/,
|
|
32
|
-
loader: 'babel-loader',
|
|
33
|
-
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
getExtensions() {
|
|
39
|
-
return [
|
|
40
|
-
'*',
|
|
41
|
-
'.js',
|
|
42
|
-
'.json'
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.JavascriptPreset = JavascriptPreset;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
|
-
class TypeScriptPreset {
|
|
5
|
-
getPlugins(filename) {
|
|
6
|
-
return [
|
|
7
|
-
new MiniCssExtractPlugin({
|
|
8
|
-
filename
|
|
9
|
-
})
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
getModule() {
|
|
13
|
-
return {
|
|
14
|
-
rules: [
|
|
15
|
-
{
|
|
16
|
-
test: /\.css$/,
|
|
17
|
-
use: [
|
|
18
|
-
MiniCssExtractPlugin.loader,
|
|
19
|
-
'css-loader'
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
test: /\.scss$/,
|
|
24
|
-
use: [
|
|
25
|
-
MiniCssExtractPlugin.loader,
|
|
26
|
-
'css-loader',
|
|
27
|
-
'sass-loader'
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
test: /\.tsx?$/,
|
|
32
|
-
loader: 'ts-loader',
|
|
33
|
-
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
test: /\.js$/,
|
|
37
|
-
loader: 'babel-loader',
|
|
38
|
-
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
test: /\.(png|jpg|gif|svg)$/,
|
|
42
|
-
loader: 'file-loader',
|
|
43
|
-
options: {
|
|
44
|
-
name: '[name].[ext]?[hash]'
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
getExtensions() {
|
|
51
|
-
return [
|
|
52
|
-
'*',
|
|
53
|
-
'.ts',
|
|
54
|
-
'.js',
|
|
55
|
-
'.json'
|
|
56
|
-
];
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.TypeScriptPreset = TypeScriptPreset;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const webpack = require("webpack");
|
|
4
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
5
|
-
const VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
|
|
6
|
-
class VueTypeScriptPreset {
|
|
7
|
-
getPlugins(filename) {
|
|
8
|
-
return [
|
|
9
|
-
new webpack.DllReferencePlugin({
|
|
10
|
-
manifest: require("@studyportals/vue-config/dist/library.json")
|
|
11
|
-
}),
|
|
12
|
-
new MiniCssExtractPlugin({
|
|
13
|
-
filename
|
|
14
|
-
}),
|
|
15
|
-
new VueLoaderPlugin()
|
|
16
|
-
];
|
|
17
|
-
}
|
|
18
|
-
getModule() {
|
|
19
|
-
return {
|
|
20
|
-
rules: [
|
|
21
|
-
{
|
|
22
|
-
test: /\.css$/,
|
|
23
|
-
use: [
|
|
24
|
-
MiniCssExtractPlugin.loader,
|
|
25
|
-
'css-loader'
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
test: /\.scss$/,
|
|
30
|
-
use: [
|
|
31
|
-
MiniCssExtractPlugin.loader,
|
|
32
|
-
'css-loader',
|
|
33
|
-
'sass-loader'
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
test: /\.vue$/,
|
|
38
|
-
loader: 'vue-loader',
|
|
39
|
-
options: {
|
|
40
|
-
loaders: {
|
|
41
|
-
'scss': [
|
|
42
|
-
'vue-style-loader',
|
|
43
|
-
'css-loader',
|
|
44
|
-
'sass-loader'
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
test: /\.tsx?$/,
|
|
51
|
-
loader: 'ts-loader',
|
|
52
|
-
exclude: /node_modules\/(?!@studyportals\/).*/,
|
|
53
|
-
options: {
|
|
54
|
-
appendTsSuffixTo: [/\.vue$/]
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
test: /\.js$/,
|
|
59
|
-
loader: 'babel-loader',
|
|
60
|
-
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
test: /\.(png|jpg|gif|svg)$/,
|
|
64
|
-
loader: 'file-loader',
|
|
65
|
-
options: {
|
|
66
|
-
name: '[name].[ext]?[hash]'
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
]
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
getExtensions() {
|
|
73
|
-
return [
|
|
74
|
-
'*',
|
|
75
|
-
'.ts',
|
|
76
|
-
'.js',
|
|
77
|
-
'.vue',
|
|
78
|
-
'.json'
|
|
79
|
-
];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.VueTypeScriptPreset = VueTypeScriptPreset;
|