@madenowhere/phaze-compile 0.0.3 → 0.0.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/dist/babel-plugin.d.ts +2 -2
- package/dist/babel-plugin.js +2 -2
- package/dist/vite-plugin.d.ts +1 -1
- package/dist/vite-plugin.js +3 -3
- package/package.json +1 -1
package/dist/babel-plugin.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import type * as t from '@babel/types';
|
|
|
3
3
|
interface Babel {
|
|
4
4
|
types: typeof t;
|
|
5
5
|
}
|
|
6
|
-
declare const
|
|
7
|
-
export default
|
|
6
|
+
declare const phazeCompile: (babel: Babel) => PluginObj<PluginPass>;
|
|
7
|
+
export default phazeCompile;
|
|
8
8
|
//# sourceMappingURL=babel-plugin.d.ts.map
|
package/dist/babel-plugin.js
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
// converts to function calls.
|
|
34
34
|
// @ts-expect-error - no published types for the plugin module
|
|
35
35
|
import jsxSyntax from '@babel/plugin-syntax-jsx';
|
|
36
|
-
const
|
|
36
|
+
const phazeCompile = (babel) => {
|
|
37
37
|
const { types } = babel;
|
|
38
38
|
return {
|
|
39
39
|
name: '@madenowhere/phaze-compile',
|
|
@@ -196,5 +196,5 @@ const containsJSX = (node) => {
|
|
|
196
196
|
}
|
|
197
197
|
return false;
|
|
198
198
|
};
|
|
199
|
-
export default
|
|
199
|
+
export default phazeCompile;
|
|
200
200
|
//# sourceMappingURL=babel-plugin.js.map
|
package/dist/vite-plugin.d.ts
CHANGED
package/dist/vite-plugin.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
// pass through untouched. The Babel parser is configured for both JSX
|
|
10
10
|
// and TypeScript syntax so `.tsx` works.
|
|
11
11
|
import { transformSync } from '@babel/core';
|
|
12
|
-
import
|
|
13
|
-
export default function
|
|
12
|
+
import phazeCompile from './babel-plugin.js';
|
|
13
|
+
export default function phazeVitePlugin() {
|
|
14
14
|
return {
|
|
15
15
|
name: '@madenowhere/phaze-compile',
|
|
16
16
|
enforce: 'pre',
|
|
@@ -22,7 +22,7 @@ export default function phaseVitePlugin() {
|
|
|
22
22
|
const out = transformSync(code, {
|
|
23
23
|
babelrc: false,
|
|
24
24
|
configFile: false,
|
|
25
|
-
plugins: [
|
|
25
|
+
plugins: [phazeCompile],
|
|
26
26
|
parserOpts: { plugins: ['jsx', 'typescript'] },
|
|
27
27
|
// Keep JSX intact in the output — esbuild will run its own
|
|
28
28
|
// JSX-to-jsx() pass downstream.
|
package/package.json
CHANGED