@nebula.js/cli-build 6.0.0-alpha.3 → 6.0.0-alpha.5
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/lib/config.js +38 -13
- package/package.json +6 -3
package/lib/config.js
CHANGED
|
@@ -10,6 +10,7 @@ const terser = require('@rollup/plugin-terser');
|
|
|
10
10
|
const jsxPlugin = require('@babel/plugin-transform-react-jsx');
|
|
11
11
|
const babelPreset = require('@babel/preset-env');
|
|
12
12
|
const { visualizer } = require('rollup-plugin-visualizer');
|
|
13
|
+
const browsersList = require('@qlik/browserslist-config');
|
|
13
14
|
|
|
14
15
|
const resolveNative = require('./resolveNative');
|
|
15
16
|
|
|
@@ -140,6 +141,32 @@ const config = ({
|
|
|
140
141
|
return outputConfig;
|
|
141
142
|
};
|
|
142
143
|
|
|
144
|
+
const babelPresets = [
|
|
145
|
+
[
|
|
146
|
+
babelPreset,
|
|
147
|
+
{
|
|
148
|
+
modules: false,
|
|
149
|
+
targets: {
|
|
150
|
+
browsers: browsersList,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
['@babel/preset-react'],
|
|
155
|
+
];
|
|
156
|
+
|
|
157
|
+
if (typescript) {
|
|
158
|
+
babelPresets.push([
|
|
159
|
+
'@babel/preset-typescript',
|
|
160
|
+
{
|
|
161
|
+
allowNamespaces: true,
|
|
162
|
+
allowDeclareFields: true,
|
|
163
|
+
onlyRemoveTypeImports: true,
|
|
164
|
+
// Fixes for _default issues
|
|
165
|
+
isolatedModules: true,
|
|
166
|
+
},
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
|
|
143
170
|
return {
|
|
144
171
|
input: {
|
|
145
172
|
onwarn(warning, warn) {
|
|
@@ -163,30 +190,28 @@ const config = ({
|
|
|
163
190
|
browser,
|
|
164
191
|
preferBuiltins,
|
|
165
192
|
}),
|
|
193
|
+
postcss({
|
|
194
|
+
exclude: /\.module\.css$/,
|
|
195
|
+
}),
|
|
196
|
+
postcss({
|
|
197
|
+
include: /\.module\.css$/,
|
|
198
|
+
modules: true,
|
|
199
|
+
extract: true,
|
|
200
|
+
}),
|
|
166
201
|
commonjs({
|
|
167
202
|
ignoreTryCatch: false, // Avoids problems with require() inside try catch (https://github.com/rollup/plugins/issues/1004)
|
|
168
203
|
}),
|
|
169
204
|
json(),
|
|
205
|
+
// Handle all CSS with conditional modules processing
|
|
206
|
+
|
|
170
207
|
babel({
|
|
171
208
|
babelHelpers: 'bundled',
|
|
172
209
|
babelrc: false,
|
|
173
210
|
inputSourceMap: sourcemap,
|
|
174
211
|
extensions,
|
|
175
|
-
presets:
|
|
176
|
-
[
|
|
177
|
-
babelPreset,
|
|
178
|
-
{
|
|
179
|
-
modules: false,
|
|
180
|
-
targets: {
|
|
181
|
-
browsers: ['chrome 62'],
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
],
|
|
185
|
-
],
|
|
212
|
+
presets: babelPresets,
|
|
186
213
|
plugins: [[jsxPlugin]],
|
|
187
214
|
}),
|
|
188
|
-
postcss({}),
|
|
189
|
-
...[typescript ? typescriptPlugin() : false],
|
|
190
215
|
...[
|
|
191
216
|
mode === 'production'
|
|
192
217
|
? terser({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nebula.js/cli-build",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "QlikTech International AB",
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"@babel/core": "7.28.4",
|
|
26
26
|
"@babel/plugin-transform-react-jsx": "7.27.1",
|
|
27
27
|
"@babel/preset-env": "7.28.3",
|
|
28
|
+
"@babel/preset-react": "7.27.1",
|
|
29
|
+
"@babel/preset-typescript": "7.27.1",
|
|
30
|
+
"@qlik/browserslist-config": "^3.0.0",
|
|
28
31
|
"@rollup/plugin-babel": "6.0.4",
|
|
29
32
|
"@rollup/plugin-commonjs": "28.0.6",
|
|
30
33
|
"@rollup/plugin-json": "6.1.0",
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
"chalk": "4.1.2",
|
|
35
38
|
"extend": "3.0.2",
|
|
36
39
|
"postcss": "^8.5.6",
|
|
37
|
-
"rollup": "4.
|
|
40
|
+
"rollup": "4.52.2",
|
|
38
41
|
"rollup-plugin-postcss": "4.0.2",
|
|
39
42
|
"rollup-plugin-visualizer": "6.0.3",
|
|
40
43
|
"yargs": "17.7.2"
|
|
@@ -44,5 +47,5 @@
|
|
|
44
47
|
"tslib": "*",
|
|
45
48
|
"typescript": ">=5.9.2"
|
|
46
49
|
},
|
|
47
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "6c45781013b90cd0674601fcd822dda2f5b77cb5"
|
|
48
51
|
}
|