diff --git a/.github/workflows/pr_temp.yml b/.github/workflows/pr_temp.yml new file mode 100644 index 0000000000..0a289a1124 --- /dev/null +++ b/.github/workflows/pr_temp.yml @@ -0,0 +1,31 @@ +name: PR Release + +on: + pull_request: + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16] + + steps: + - name: Checkout Branch + uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + + - name: Setup + run: pnpm run setup + + - run: pnpx pkg-pr-new publish './packages/*' diff --git a/packages/ice/templates/core/env.ts.ejs b/packages/ice/templates/core/env.ts.ejs index fd177327ad..55af9bdf7c 100644 --- a/packages/ice/templates/core/env.ts.ejs +++ b/packages/ice/templates/core/env.ts.ejs @@ -11,7 +11,7 @@ export const isKuaiShouMiniProgram = isClient && import.meta.target === 'kuaisho export const isWeChatMiniProgram = isClient && import.meta.target === 'wechat-miniprogram'; export const isKraken = isClient && import.meta.target === 'kraken'; export const isQuickApp = false; // Now ice.js will not implement quick app target. -export const isMiniApp = isAliMiniApp || isByteDanceMicroApp || isBaiduSmartProgram || isKuaiShouMiniProgram || isWeChatMiniProgram; +export const isMiniApp = isAliMiniApp;// in universal-env, isMiniApp is equals to isAliMiniApp // Following variables are runtime executed envs. // See also @uni/env. diff --git a/packages/plugin-miniapp/src/miniapp/index.ts b/packages/plugin-miniapp/src/miniapp/index.ts index 31150f480c..8128c232a1 100644 --- a/packages/plugin-miniapp/src/miniapp/index.ts +++ b/packages/plugin-miniapp/src/miniapp/index.ts @@ -80,6 +80,7 @@ const getMiniappTask = ({ enableCache: false, plugins, loaders: module?.rules, + assetsManifest: false, optimization: { sideEffects: true, usedExports: true, diff --git a/packages/plugin-miniapp/src/miniapp/webpack/module.ts b/packages/plugin-miniapp/src/miniapp/webpack/module.ts index dc0190e5a5..6e252b9015 100644 --- a/packages/plugin-miniapp/src/miniapp/webpack/module.ts +++ b/packages/plugin-miniapp/src/miniapp/webpack/module.ts @@ -57,13 +57,23 @@ export class MiniWebpackModule { test: REG_TEMPLATE, type: 'asset/resource', generator: { - filename({ filename }) { + filename: ({ filename }) => { const extname = path.extname(filename); return filename.replace(`${this.sourceRoot}/`, '').replace(extname, fileType.templ); }, }, use: [this.getLoader(path.resolve(__dirname, './loaders/miniTemplateLoader'))], }, + { + test: /\.wxss$/, + type: 'asset/resource', + generator: { + filename: ({ filename }) => { + const extname = path.extname(filename); + return filename.replace(`${this.sourceRoot}/`, '').replace(extname, fileType.style); + }, + }, + }, ]; return { rules }; }