Skip to content

Commit

Permalink
fix: prod build minifier work with utf8, fix remote caching type
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgv committed May 20, 2023
1 parent ef88d55 commit c564a4a
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cli/create-plasmo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-plasmo",
"version": "0.71.0",
"version": "0.71.1",
"description": "Create Plasmo Framework Browser Extension",
"main": "dist/index.js",
"bin": "bin/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion cli/plasmo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plasmo",
"version": "0.71.0",
"version": "0.71.1",
"description": "The Plasmo Framework CLI",
"publishConfig": {
"types": "dist/type.d.ts"
Expand Down
2 changes: 2 additions & 0 deletions cli/plasmo/templates/plasmo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ declare module "*.graphql"

declare module "react:*"

declare module "https:*"

declare module "url:*" {
const value: string
export default value
Expand Down
2 changes: 1 addition & 1 deletion examples
2 changes: 1 addition & 1 deletion packages/parcel-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmohq/parcel-config",
"version": "0.35.0",
"version": "0.35.1",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/parcel-optimizer-es/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmohq/parcel-optimizer-es",
"version": "0.2.0",
"version": "0.2.1",
"description": "Plasmo ECMAScript Optimizer for Extension",
"files": [
"dist"
Expand Down
6 changes: 1 addition & 5 deletions packages/parcel-optimizer-es/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,10 @@ export default new Optimizer({

vLog(`optimizer-es: use SWC for ${bundle.displayName}`)

const swcOutput = await swcTransform(code, {
const swcOutput = await swcTransform(toUtf8(code), {
jsc: {
target: "es2022",

minify: {
format: {
ascii_only: true
},
mangle: shouldMinify,
compress: shouldMinify,
sourceMap: sourceMapType !== "none",
Expand Down
2 changes: 1 addition & 1 deletion packages/parcel-resolver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmohq/parcel-resolver",
"version": "0.12.1",
"version": "0.12.2",
"description": "Plasmo Parcel Resolver",
"files": [
"dist"
Expand Down
4 changes: 2 additions & 2 deletions packages/parcel-resolver/src/handle-remote-caching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { resolve } from "path"
import { injectEnv } from "@plasmo/utils/env"

import {
ResolverProps,
ResolverResult,
type ResolverProps,
type ResolverResult,
relevantExtensionList,
state
} from "./shared"
Expand Down
62 changes: 55 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c564a4a

Please sign in to comment.