@startupjs/bundler 0.53.3 → 0.54.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.
@@ -1,3 +1,4 @@
1
+ const path = require('path')
1
2
  const REGEX = /(```jsx +(?:example|pure-example)[\s\S]*?\n)([\s\S]*?)(```)/g
2
3
 
3
4
  const FLAGS = [
@@ -12,7 +13,9 @@ import { observer as __observer } from 'startupjs'
12
13
  `
13
14
 
14
15
  module.exports = function mdxExamplesLoader (source) {
15
- return DEFAULT_MDX_RENDERER + '\n' + source.replace(REGEX, replacer)
16
+ return path.extname(this.resourcePath) === '.mdx'
17
+ ? DEFAULT_MDX_RENDERER + '\n' + source.replace(REGEX, replacer)
18
+ : source
16
19
  }
17
20
 
18
21
  function replacer (match, p1, p2, p3) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs/bundler",
3
- "version": "0.53.3",
3
+ "version": "0.54.0",
4
4
  "description": "Opinionated scripts and configs to develop a react-native-web project",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -21,12 +21,12 @@
21
21
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
22
22
  "@startupjs/babel-plugin-react-css-modules": "^6.5.4-1",
23
23
  "@startupjs/css-to-react-native-transform": "^1.9.0-1",
24
- "@startupjs/plugin": "^0.53.0",
24
+ "@startupjs/plugin": "^0.54.0",
25
25
  "@svgr/webpack": "~7.0.0",
26
26
  "assets-webpack-plugin": "^7.1.1",
27
27
  "autoprefixer": "^10.4.0",
28
28
  "babel-loader": "^8.2.3",
29
- "babel-preset-startupjs": "^0.53.3",
29
+ "babel-preset-startupjs": "^0.54.0",
30
30
  "css-loader": "^6.5.0",
31
31
  "css-minimizer-webpack-plugin": "^5.0.0",
32
32
  "file-loader": "^6.2.0",
@@ -50,5 +50,5 @@
50
50
  "peerDependencies": {
51
51
  "react-native-svg": ">= 12.1.0"
52
52
  },
53
- "gitHead": "055f8e98b3b8cb3c00c0262bea8ead98104677e0"
53
+ "gitHead": "6ff1f85289a0b0aa9aef46f55b9cbbb556707f0c"
54
54
  }