@startupjs/bundler 0.40.6 → 0.41.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.
@@ -1,5 +1,5 @@
1
1
  const REGEX = /(```jsx +example[\s\S]*?\n)([\s\S]*?)(```)/g
2
- const PURE_REGEX = /(```jsx) +pure-example([\s\S]*?)(```)/g
2
+ const PURE_REGEX = /(```jsx +pure-example[\s\S]*?\n)([\s\S]*?)(```)/g
3
3
 
4
4
  const EXAMPLE_FLAGS = [
5
5
  'noscroll'
@@ -44,11 +44,21 @@ function replacer (match, p1, p2, p3) {
44
44
  }
45
45
 
46
46
  function pureReplacer (match, p1, p2, p3) {
47
+ const parts = p1.trim().split(' ')
48
+ const sectionParts = []
49
+
50
+ for (const part of parts) {
51
+ if (EXAMPLE_FLAGS.includes(part)) {
52
+ sectionParts.push(part)
53
+ continue
54
+ }
55
+ }
56
+
47
57
  p2 = p2.trim().replace(/\n+/g, '\n')
48
58
  if (/^</.test(p2)) p2 = 'return (<React.Fragment>' + p2 + '</React.Fragment>)'
49
59
 
50
60
  return (
51
- `<section>
61
+ `<section ${sectionParts.join(' ')}>
52
62
  <React.Fragment>
53
63
  {React.createElement(__observer(function Example () {
54
64
  ${p2}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs/bundler",
3
- "version": "0.40.6",
3
+ "version": "0.41.4",
4
4
  "description": "Opinionated scripts and configs to develop a react-native-web project",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -20,12 +20,12 @@
20
20
  "@mdx-js/mdx": "^1.6.22",
21
21
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
22
22
  "@startupjs/css-to-react-native-transform": "^1.9.0-1",
23
- "@startupjs/plugin": "^0.40.0",
23
+ "@startupjs/plugin": "^0.41.2",
24
24
  "@svgr/webpack": "~5.5.0",
25
25
  "assets-webpack-plugin": "^7.1.1",
26
26
  "autoprefixer": "^10.4.0",
27
27
  "babel-loader": "^8.2.3",
28
- "babel-preset-startupjs": "^0.40.6",
28
+ "babel-preset-startupjs": "^0.41.4",
29
29
  "css-loader": "^6.5.0",
30
30
  "css-minimizer-webpack-plugin": "^3.1.1",
31
31
  "file-loader": "^6.2.0",
@@ -49,5 +49,5 @@
49
49
  "peerDependencies": {
50
50
  "react-native-svg": ">= 12.1.0"
51
51
  },
52
- "gitHead": "a2c393f4d922498374151663530fb689c8d9c4d6"
52
+ "gitHead": "72a5409df2bace2e81385b40be4246282155fbaf"
53
53
  }
@@ -258,7 +258,9 @@ module.exports = function getConfig (env, {
258
258
  {
259
259
  loader: 'postcss-loader',
260
260
  options: {
261
- plugins: [autoprefixer]
261
+ postcssOptions: {
262
+ plugins: [autoprefixer]
263
+ }
262
264
  }
263
265
  },
264
266
  {