@nitro/webpack 7.3.0 → 7.5.0
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 +9 -12
- package/readme.md +3 -9
- package/webpack-config/webpack.config.dev.js +0 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitro/webpack",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"description": "nitro webpack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "The Nitro Team",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"nitro"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@babel/core": "7.21.
|
|
27
|
-
"@babel/preset-env": "7.
|
|
26
|
+
"@babel/core": "7.21.5",
|
|
27
|
+
"@babel/preset-env": "7.21.5",
|
|
28
28
|
"@babel/preset-react": "7.18.6",
|
|
29
29
|
"@babel/plugin-proposal-decorators": "7.21.0",
|
|
30
30
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
"autoprefixer": "10.4.14",
|
|
33
33
|
"case-sensitive-paths-webpack-plugin": "2.4.0",
|
|
34
34
|
"css-loader": "5.2.7",
|
|
35
|
-
"eslint": "7.32.0",
|
|
36
|
-
"eslint-webpack-plugin": "2.7.0",
|
|
37
|
-
"eslint-plugin-import": "2.27.5",
|
|
38
35
|
"file-loader": "6.2.0",
|
|
39
36
|
"handlebars-loader": "1.7.3",
|
|
40
37
|
"iconfont-webpack-plugin": "5.0.1",
|
|
@@ -43,16 +40,14 @@
|
|
|
43
40
|
"js-config-webpack-plugin": "2.0.3",
|
|
44
41
|
"mini-css-extract-plugin": "1.6.2",
|
|
45
42
|
"optimize-css-assets-webpack-plugin": "6.0.1",
|
|
46
|
-
"postcss": "8.4.
|
|
43
|
+
"postcss": "8.4.23",
|
|
47
44
|
"postcss-loader": "4.3.0",
|
|
48
45
|
"resolve-url-loader": "5.0.0",
|
|
49
|
-
"sass": "1.
|
|
46
|
+
"sass": "1.62.1",
|
|
50
47
|
"sass-loader": "10.4.1",
|
|
51
|
-
"stylelint": "14.16.1",
|
|
52
|
-
"stylelint-webpack-plugin": "2.4.0",
|
|
53
48
|
"svgo": "3.0.2",
|
|
54
49
|
"ts-config-webpack-plugin": "2.0.3",
|
|
55
|
-
"typescript": "
|
|
50
|
+
"typescript": "5.0.4",
|
|
56
51
|
"url-loader": "4.1.1",
|
|
57
52
|
"webpack": "4.46.0",
|
|
58
53
|
"webpackbar": "5.0.2",
|
|
@@ -65,7 +60,9 @@
|
|
|
65
60
|
"imagemin-svgo": "9.0.0"
|
|
66
61
|
},
|
|
67
62
|
"devDependencies": {
|
|
68
|
-
"@merkle-open/eslint-config": "1.0.0"
|
|
63
|
+
"@merkle-open/eslint-config": "1.0.0",
|
|
64
|
+
"eslint": "7.32.0",
|
|
65
|
+
"eslint-plugin-import": "2.27.5"
|
|
69
66
|
},
|
|
70
67
|
"publishConfig": {
|
|
71
68
|
"access": "public"
|
package/readme.md
CHANGED
|
@@ -11,13 +11,9 @@ Configurable and easy to use webpack 4 config for nitro projects.
|
|
|
11
11
|
```
|
|
12
12
|
const options = {
|
|
13
13
|
rules: {
|
|
14
|
-
js:
|
|
15
|
-
eslint: false,
|
|
16
|
-
},
|
|
14
|
+
js: true,
|
|
17
15
|
ts: false,
|
|
18
|
-
scss:
|
|
19
|
-
stylelint: false,
|
|
20
|
-
},
|
|
16
|
+
scss: true,
|
|
21
17
|
hbs: true,
|
|
22
18
|
woff: true,
|
|
23
19
|
font: false,
|
|
@@ -50,7 +46,6 @@ No loader rule is enabled by default. Activate following prepared rules you need
|
|
|
50
46
|
Config:
|
|
51
47
|
|
|
52
48
|
- `true` or `{}` activates JavaScript support
|
|
53
|
-
- `{ eslint: true }` additionally adds eslint live linting feature (only relevant for development build)
|
|
54
49
|
|
|
55
50
|
#### `options.rules.ts`
|
|
56
51
|
|
|
@@ -71,7 +66,6 @@ Config:
|
|
|
71
66
|
Config:
|
|
72
67
|
|
|
73
68
|
- `true` or `{}` will activate scss support
|
|
74
|
-
- `{ stylelint: true }` additionally adds stylelint live linting feature (only relevant for development build)
|
|
75
69
|
- `{ publicPath: '../' }` provide a separate public path for stylesheets. By default, webpack uses the value from 'output.publicPath'. (only relevant for production build)
|
|
76
70
|
- `{ implementation: require('node-sass') }` gives the possibility to use 'node-sass' as sass implementation. (you have to add 'node-sass' as a dev-dependency in your project)
|
|
77
71
|
|
|
@@ -112,7 +106,7 @@ Config:
|
|
|
112
106
|
- `{ exclude: [] }` additionally adds exclude config to rule
|
|
113
107
|
|
|
114
108
|
⚠ Please use this rule with care. You have to configure includes and exclude when you also use woff and/or image loader.
|
|
115
|
-
Otherwise svg or woff files are processed with multiple configurations.
|
|
109
|
+
Otherwise, svg or woff files are processed with multiple configurations.
|
|
116
110
|
|
|
117
111
|
#### `options.rules.image`
|
|
118
112
|
|
|
@@ -4,10 +4,8 @@ const crypto = require('crypto');
|
|
|
4
4
|
const webpack = require('webpack');
|
|
5
5
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
6
6
|
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
|
7
|
-
const ESLintPlugin = require('eslint-webpack-plugin');
|
|
8
7
|
const JsConfigWebpackPlugin = require('js-config-webpack-plugin');
|
|
9
8
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
10
|
-
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
11
9
|
const TsConfigWebpackPlugin = require('ts-config-webpack-plugin');
|
|
12
10
|
const DynamicAliasResolverPlugin = require('../plugins/dynamicAliasResolver');
|
|
13
11
|
const utils = require('../lib/utils');
|
|
@@ -108,14 +106,6 @@ module.exports = (options = { rules: {}, features: {} }) => {
|
|
|
108
106
|
// js
|
|
109
107
|
if (options.rules.js) {
|
|
110
108
|
webpackConfig.plugins.push(new JsConfigWebpackPlugin({ babelConfigFile: './babel.config.js' }));
|
|
111
|
-
|
|
112
|
-
// eslint live validation
|
|
113
|
-
if (options.rules.js.eslint) {
|
|
114
|
-
const esLintPluginOptions = {
|
|
115
|
-
lintDirtyModulesOnly: true,
|
|
116
|
-
};
|
|
117
|
-
webpackConfig.plugins.push(new ESLintPlugin(esLintPluginOptions));
|
|
118
|
-
}
|
|
119
109
|
}
|
|
120
110
|
|
|
121
111
|
// typescript
|
|
@@ -182,20 +172,6 @@ module.exports = (options = { rules: {}, features: {} }) => {
|
|
|
182
172
|
filename: '[file].map',
|
|
183
173
|
})
|
|
184
174
|
);
|
|
185
|
-
|
|
186
|
-
// stylelint live validation
|
|
187
|
-
if (options.rules.scss.stylelint) {
|
|
188
|
-
webpackConfig.plugins.push(
|
|
189
|
-
new StyleLintPlugin({
|
|
190
|
-
files: ['src/**/*.?(s)css'],
|
|
191
|
-
// lintDirtyModulesOnly: true,
|
|
192
|
-
syntax: 'scss',
|
|
193
|
-
quiet: false,
|
|
194
|
-
failOnError: false,
|
|
195
|
-
emitErrors: true,
|
|
196
|
-
})
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
175
|
}
|
|
200
176
|
|
|
201
177
|
// handlebars precompiled templates
|