vite-plugin-solid
Advanced tools
Comparing version 0.8.2 to 0.8.3
'use strict'; | ||
var solid = require('babel-preset-solid'); | ||
var core = require('@babel/core'); | ||
var solid = require('babel-preset-solid'); | ||
@@ -10,3 +10,3 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
function solidPlugin(options) { | ||
function solidPlugin(options = {}) { | ||
let needHmr = false; | ||
@@ -16,3 +16,10 @@ return { | ||
config() { | ||
config(_, { | ||
command | ||
}) { | ||
const replaceDev = options.dev !== false; | ||
const alias = command === 'serve' && replaceDev ? [{ | ||
find: /^solid-js$/, | ||
replacement: 'solid-js/dev' | ||
}] : []; | ||
return { | ||
@@ -27,6 +34,7 @@ /** | ||
resolve: { | ||
dedupe: ['solid-js', 'solid-js/web'] | ||
dedupe: ['solid-js', 'solid-js/web'], | ||
alias | ||
}, | ||
optimizeDeps: { | ||
include: ['solid-js/web'] | ||
include: ['solid-js/dev', 'solid-js/web'] | ||
} | ||
@@ -33,0 +41,0 @@ }; |
@@ -0,5 +1,5 @@ | ||
import solid from 'babel-preset-solid'; | ||
import { transformAsync } from '@babel/core'; | ||
import solid from 'babel-preset-solid'; | ||
function solidPlugin(options) { | ||
function solidPlugin(options = {}) { | ||
let needHmr = false; | ||
@@ -9,3 +9,10 @@ return { | ||
config() { | ||
config(_, { | ||
command | ||
}) { | ||
const replaceDev = options.dev !== false; | ||
const alias = command === 'serve' && replaceDev ? [{ | ||
find: /^solid-js$/, | ||
replacement: 'solid-js/dev' | ||
}] : []; | ||
return { | ||
@@ -20,6 +27,7 @@ /** | ||
resolve: { | ||
dedupe: ['solid-js', 'solid-js/web'] | ||
dedupe: ['solid-js', 'solid-js/web'], | ||
alias | ||
}, | ||
optimizeDeps: { | ||
include: ['solid-js/web'] | ||
include: ['solid-js/dev', 'solid-js/web'] | ||
} | ||
@@ -26,0 +34,0 @@ }; |
import { Plugin } from 'vite'; | ||
interface Options { | ||
dev: boolean; | ||
moduleName: string; | ||
@@ -4,0 +5,0 @@ builtIns: string[]; |
{ | ||
"name": "vite-plugin-solid", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"description": "solid-js integration plugin for vite 2", | ||
@@ -32,2 +32,3 @@ "files": [ | ||
"vitejs plugin", | ||
"vite-plugin", | ||
"solid" | ||
@@ -47,11 +48,11 @@ ], | ||
"dependencies": { | ||
"@babel/core": "^7.12.13", | ||
"@babel/preset-typescript": "^7.12.13", | ||
"@babel/core": "^7.12.16", | ||
"@babel/preset-typescript": "^7.12.16", | ||
"babel-preset-solid": "^0.24.2", | ||
"resolve.exports": "^1.0.2", | ||
"solid-js": "^0.24.4", | ||
"vite": "^2.0.0-beta.68" | ||
"solid-js": "^0.24.5", | ||
"vite": "^2.0.0-beta.69" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-transform-typescript": "^7.12.13", | ||
"@babel/plugin-transform-typescript": "^7.12.16", | ||
"@rollup/plugin-babel": "^5.2.3", | ||
@@ -61,5 +62,5 @@ "@rollup/plugin-node-resolve": "^11.1.1", | ||
"@types/babel__core": "^7.1.12", | ||
"@types/node": "^14.14.25", | ||
"@types/node": "^14.14.27", | ||
"prettier": "^2.2.1", | ||
"rollup": "^2.38.5", | ||
"rollup": "^2.39.0", | ||
"rollup-plugin-cleaner": "^1.0.0", | ||
@@ -66,0 +67,0 @@ "typescript": "^4.1.5" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
18731
158
Updated@babel/core@^7.12.16
Updatedsolid-js@^0.24.5
Updatedvite@^2.0.0-beta.69