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