@s-ui/bundler 9.71.0 → 9.72.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/README.md +8 -8
- package/package.json +1 -1
- package/shared/module-rules-compiler.js +2 -2
package/README.md
CHANGED
|
@@ -167,6 +167,8 @@ This tool works with zero configuration out the box but you could use some confi
|
|
|
167
167
|
|
|
168
168
|
`targets`: Object with information about the browser and version supported. (default: `see the next example`)
|
|
169
169
|
|
|
170
|
+
`disableTypeScriptLoader`: Flag to determine if typescript loader should be used. (default: `false`)
|
|
171
|
+
|
|
170
172
|
```json
|
|
171
173
|
{
|
|
172
174
|
"config": {
|
|
@@ -184,7 +186,8 @@ This tool works with zero configuration out the box but you could use some confi
|
|
|
184
186
|
"sourcemaps": {
|
|
185
187
|
"dev": "cheap-module-eval-source-map",
|
|
186
188
|
"prod": "hidden-source-map"
|
|
187
|
-
}
|
|
189
|
+
},
|
|
190
|
+
"disableTypeScriptLoader": true // Only if you want to disable typescript loader
|
|
188
191
|
}
|
|
189
192
|
}
|
|
190
193
|
}
|
|
@@ -291,8 +294,7 @@ If in your CSS you have:
|
|
|
291
294
|
```css
|
|
292
295
|
#app {
|
|
293
296
|
color: blue;
|
|
294
|
-
background: url('https://spa-mock-statics.surge.sh/images/common/sprite-sheet/sprite-ma.png')
|
|
295
|
-
no-repeat scroll;
|
|
297
|
+
background: url('https://spa-mock-statics.surge.sh/images/common/sprite-sheet/sprite-ma.png') no-repeat scroll;
|
|
296
298
|
}
|
|
297
299
|
```
|
|
298
300
|
|
|
@@ -301,17 +303,15 @@ After compile you will get:
|
|
|
301
303
|
```css
|
|
302
304
|
#app {
|
|
303
305
|
color: #00f;
|
|
304
|
-
background: url(https://spa-mock-statics.surge.sh/images/common/sprite-sheet/sprite-ma.72d1edb214.png)
|
|
305
|
-
|
|
306
|
+
background: url(https://spa-mock-statics.surge.sh/images/common/sprite-sheet/sprite-ma.72d1edb214.png) no-repeat
|
|
307
|
+
scroll;
|
|
306
308
|
}
|
|
307
309
|
```
|
|
308
310
|
|
|
309
311
|
Or if in your JS you have:
|
|
310
312
|
|
|
311
313
|
```jsx
|
|
312
|
-
<img
|
|
313
|
-
src={'https://spa-mock-statics.surge.sh/images/common/mis-anuncios2.gif'}
|
|
314
|
-
/>
|
|
314
|
+
<img src={'https://spa-mock-statics.surge.sh/images/common/mis-anuncios2.gif'} />
|
|
315
315
|
```
|
|
316
316
|
|
|
317
317
|
After compile will be:
|
package/package.json
CHANGED
|
@@ -26,8 +26,8 @@ const getTSConfig = () => {
|
|
|
26
26
|
|
|
27
27
|
module.exports = ({isServer = false, isDevelopment = false, supportLegacyBrowsers = true} = {}) => {
|
|
28
28
|
const tsConfig = getTSConfig()
|
|
29
|
-
// If TS config exists in root dir, set TypeScript as enabled.
|
|
30
|
-
const isTypeScriptEnabled = Boolean(tsConfig)
|
|
29
|
+
// If config.disableTypeScriptLoader is not true and TS config exists in root dir, set TypeScript as enabled.
|
|
30
|
+
const isTypeScriptEnabled = !config.disableTypeScriptLoader && Boolean(tsConfig)
|
|
31
31
|
|
|
32
32
|
return isTypeScriptEnabled
|
|
33
33
|
? {
|