Skip to content

Commit

Permalink
fix: ignore vite module
Browse files Browse the repository at this point in the history
  • Loading branch information
ajuner committed Jun 28, 2021
1 parent f139b3d commit 121b833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-importer",
"version": "0.2.3",
"version": "0.2.4",
"main": "src/index.js",
"description": "Integration for babel-plugin-import",
"author": "ajuner",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function usePluginImport(options) {

transform(code, id) {

if (/\.(?:[jt]sx?|vue)$/.test(id)) {
if (/\.(?:[jt]sx?|vue)$/.test(id) && !/node_modules\/vite/.test(id)) {
const plugins = [importMeta, [babelImport, options]]

const result = babel.transformSync(code, {
Expand Down

0 comments on commit 121b833

Please sign in to comment.