Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] PWC Rollup 插件接入组件工程形式 #47

Open
ChrisCindy opened this issue Apr 14, 2022 · 3 comments
Open

[Discussion] PWC Rollup 插件接入组件工程形式 #47

ChrisCindy opened this issue Apr 14, 2022 · 3 comments

Comments

@ChrisCindy
Copy link
Contributor

ChrisCindy commented Apr 14, 2022

1. 内置

组件工程内置 PWC Rollup 插件,用户可零配置开箱即用。对于 PWC Rollup 插件独有的配置,可在 build.config.ts 中添加 pwc 字段处理:

import { defineConfig } from '@ice/pkg';

export default defineConfig({
  pwc: {
    //...
  }
})

2. 外置,需由用户自行引入,类似 vite 中使用 vue 插件:

import { defineConfig } from '@ice/pkg-cli';
import pwc from 'rollup-plugin-pwc'; // 或处理为 build scripts 插件

export default defineConfig({
  plugins: [pwc()]
})

3. PWC 独立工程二次包装 @ice/pkg

@imsobear
Copy link

2

@SoloJiang
Copy link
Contributor

SoloJiang commented Apr 14, 2022

2 应该不是 rollup 插件而是 build-scripts plugin 吧?

@imsobear
Copy link

2 应该不是 rollup 插件而是 build-scripts plugin 吧?

如果 rollup 插件能承载那就用 rollup 插件,承载不了那就用 build-scripts 插件(能力更强大一些)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants