@elliemae/pui-cli 6.0.0-beta.1 → 6.0.0-beta.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.
|
@@ -15,6 +15,7 @@ const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|
|
15
15
|
const stylelintFormatter = require('stylelint-formatter-pretty');
|
|
16
16
|
// const ESLintPlugin = require('eslint-webpack-plugin');
|
|
17
17
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|
18
|
+
const { ProvidePlugin } = require('webpack');
|
|
18
19
|
|
|
19
20
|
const {
|
|
20
21
|
excludeNodeModulesExcept,
|
|
@@ -27,6 +28,8 @@ const {
|
|
|
27
28
|
} = require('./helpers');
|
|
28
29
|
const { isTypeScripEnabled } = require('../typescript/util');
|
|
29
30
|
|
|
31
|
+
const ESBUILD_TARGET = 'es2020';
|
|
32
|
+
|
|
30
33
|
// get the application configuration
|
|
31
34
|
const devMode = process.env.NODE_ENV !== 'production';
|
|
32
35
|
const minicssLoader = {
|
|
@@ -55,6 +58,9 @@ const plugins = [
|
|
|
55
58
|
}),
|
|
56
59
|
new CaseSensitivePathsPlugin(),
|
|
57
60
|
// new ESLintPlugin(),
|
|
61
|
+
new ProvidePlugin({
|
|
62
|
+
React: 'react',
|
|
63
|
+
}),
|
|
58
64
|
new StyleLintPlugin({
|
|
59
65
|
emitError: true,
|
|
60
66
|
emitWarning: true,
|
|
@@ -165,7 +171,7 @@ module.exports = (options) => ({
|
|
|
165
171
|
loader: 'esbuild-loader',
|
|
166
172
|
options: {
|
|
167
173
|
loader: 'jsx',
|
|
168
|
-
target:
|
|
174
|
+
target: ESBUILD_TARGET,
|
|
169
175
|
},
|
|
170
176
|
},
|
|
171
177
|
},
|
|
@@ -179,7 +185,7 @@ module.exports = (options) => ({
|
|
|
179
185
|
loader: 'esbuild-loader',
|
|
180
186
|
options: {
|
|
181
187
|
loader: 'tsx',
|
|
182
|
-
target:
|
|
188
|
+
target: ESBUILD_TARGET,
|
|
183
189
|
},
|
|
184
190
|
},
|
|
185
191
|
},
|
|
@@ -194,6 +200,13 @@ module.exports = (options) => ({
|
|
|
194
200
|
sourceMap: true,
|
|
195
201
|
},
|
|
196
202
|
},
|
|
203
|
+
{
|
|
204
|
+
loader: 'esbuild-loader',
|
|
205
|
+
options: {
|
|
206
|
+
loader: 'css',
|
|
207
|
+
minify: options.mode === 'production',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
197
210
|
{
|
|
198
211
|
loader: 'postcss-loader',
|
|
199
212
|
options: {
|