@s-ui/bundler 9.11.0 → 9.12.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s-ui/bundler",
3
- "version": "9.11.0",
3
+ "version": "9.12.0",
4
4
  "description": "Config-free bundler for ES6 React apps.",
5
5
  "bin": {
6
6
  "sui-bundler": "./bin/sui-bundler.js"
@@ -1,5 +1,5 @@
1
1
  const path = require('path')
2
- const {config} = require('./config')
2
+ const {config} = require('./config.js')
3
3
 
4
4
  const {PWD} = process.env
5
5
 
@@ -20,11 +20,16 @@ const defaultPackagesToAlias = [
20
20
  const createAliasPath = pkgName =>
21
21
  path.resolve(path.join(PWD, `./node_modules/${pkgName}`))
22
22
 
23
+ const mustPackagesToAlias = {
24
+ 'react/jsx-dev-runtime': 'react/jsx-dev-runtime.js',
25
+ 'react/jsx-runtime': 'react/jsx-runtime.js'
26
+ }
27
+
23
28
  exports.defaultAlias = Object.fromEntries(
24
29
  defaultPackagesToAlias.map(pkgName => [pkgName, createAliasPath(pkgName)])
25
30
  )
26
31
 
27
- exports.aliasFromConfig = config.alias
32
+ const aliasFromConfig = config.alias
28
33
  ? Object.entries(config.alias).reduce(
29
34
  (obj, [aliasName, aliasPath]) => ({
30
35
  ...obj,
@@ -35,3 +40,8 @@ exports.aliasFromConfig = config.alias
35
40
  {}
36
41
  )
37
42
  : {}
43
+
44
+ exports.aliasFromConfig = {
45
+ ...mustPackagesToAlias,
46
+ ...aliasFromConfig
47
+ }