@vkontakte/create-vk-mini-app
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1
{ | ||
"name": "@vkontakte/create-vk-mini-app", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0-alpha.1", | ||
"description": "VK Mini Apps Boilerplate", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/VKCOM/create-vk-mini-app", |
import { defineConfig, transformWithEsbuild } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
function handleModuleDirectivesPlugin() { | ||
return { | ||
name: 'handle-module-directives-plugin', | ||
transform(code, id) { | ||
if (id.includes('@vkontakte/icons')) { | ||
code = code.replace(/"use-client";?/g, ''); | ||
} | ||
return { code }; | ||
}, | ||
}; | ||
} | ||
function threatJsFilesAsJsx() { | ||
return { | ||
name: 'treat-js-files-as-jsx', | ||
async transform(code, id) { | ||
if (!id.match(/src\/.*\.js$/)) return null; | ||
return transformWithEsbuild(code, id, { | ||
loader: 'jsx', | ||
jsx: 'automatic', | ||
}); | ||
}, | ||
}; | ||
} | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
{ | ||
name: 'treat-js-files-as-jsx', | ||
async transform(code, id) { | ||
if (!id.match(/src\/.*\.js$/)) return null; | ||
plugins: [react(), threatJsFilesAsJsx(), handleModuleDirectivesPlugin()], | ||
return transformWithEsbuild(code, id, { | ||
loader: 'jsx', | ||
jsx: 'automatic', | ||
}); | ||
}, | ||
}, | ||
react(), | ||
], | ||
optimizeDeps: { | ||
@@ -22,0 +35,0 @@ force: true, |
import { defineConfig, transformWithEsbuild } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
function handleModuleDirectivesPlugin() { | ||
return { | ||
name: 'handle-module-directives-plugin', | ||
transform(code, id) { | ||
if (id.includes('@vkontakte/icons')) { | ||
code = code.replace(/"use-client";?/g, ''); | ||
} | ||
return { code }; | ||
}, | ||
}; | ||
} | ||
function threatJsFilesAsJsx() { | ||
return { | ||
name: 'treat-js-files-as-jsx', | ||
async transform(code, id) { | ||
if (!id.match(/src\/.*\.js$/)) return null; | ||
return transformWithEsbuild(code, id, { | ||
loader: 'jsx', | ||
jsx: 'automatic', | ||
}); | ||
}, | ||
}; | ||
} | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
{ | ||
name: 'treat-js-files-as-jsx', | ||
async transform(code, id) { | ||
if (!id.match(/src\/.*\.js$/)) return null; | ||
plugins: [react(), threatJsFilesAsJsx(), handleModuleDirectivesPlugin()], | ||
return transformWithEsbuild(code, id, { | ||
loader: 'jsx', | ||
jsx: 'automatic', | ||
}); | ||
}, | ||
}, | ||
react(), | ||
], | ||
optimizeDeps: { | ||
@@ -22,0 +35,0 @@ force: true, |
import { defineConfig, transformWithEsbuild } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
function handleModuleDirectivesPlugin() { | ||
return { | ||
name: 'handle-module-directives-plugin', | ||
transform(code, id) { | ||
if (id.includes('@vkontakte/icons')) { | ||
code = code.replace(/"use-client";?/g, ''); | ||
} | ||
return { code }; | ||
}, | ||
}; | ||
} | ||
function threatJsFilesAsJsx() { | ||
return { | ||
name: 'treat-js-files-as-jsx', | ||
async transform(code, id) { | ||
if (!id.match(/src\/.*\.js$/)) return null; | ||
return transformWithEsbuild(code, id, { | ||
loader: 'jsx', | ||
jsx: 'automatic', | ||
}); | ||
}, | ||
}; | ||
} | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
{ | ||
name: 'treat-js-files-as-jsx', | ||
async transform(code, id) { | ||
if (!id.match(/src\/.*\.js$/)) return null; | ||
plugins: [react(), threatJsFilesAsJsx(), handleModuleDirectivesPlugin()], | ||
return transformWithEsbuild(code, id, { | ||
loader: 'jsx', | ||
jsx: 'automatic', | ||
}); | ||
}, | ||
}, | ||
react(), | ||
], | ||
optimizeDeps: { | ||
@@ -22,0 +35,0 @@ force: true, |
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
function handleModuleDirectivesPlugin() { | ||
return { | ||
name: 'handle-module-directives-plugin', | ||
transform(code, id) { | ||
if (id.includes('@vkontakte/icons')) { | ||
code = code.replace(/"use-client";?/g, ''); | ||
} | ||
return { code }; | ||
}, | ||
}; | ||
} | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
plugins: [react(), handleModuleDirectivesPlugin()], | ||
@@ -8,0 +20,0 @@ build: { |
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
function handleModuleDirectivesPlugin() { | ||
return { | ||
name: 'handle-module-directives-plugin', | ||
transform(code, id) { | ||
if (id.includes('@vkontakte/icons')) { | ||
code = code.replace(/"use-client";?/g, ''); | ||
} | ||
return { code }; | ||
}, | ||
}; | ||
} | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
plugins: [react(), handleModuleDirectivesPlugin()], | ||
@@ -8,0 +20,0 @@ build: { |
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
function handleModuleDirectivesPlugin() { | ||
return { | ||
name: 'handle-module-directives-plugin', | ||
transform(code, id) { | ||
if (id.includes('@vkontakte/icons')) { | ||
code = code.replace(/"use-client";?/g, ''); | ||
} | ||
return { code }; | ||
}, | ||
}; | ||
} | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
plugins: [react(), handleModuleDirectivesPlugin()], | ||
@@ -8,0 +20,0 @@ build: { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
392919
8674
0