@blocklet/pages-kit-block-studio 0.4.22 → 0.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57,6 +57,7 @@ const rollup_plugin_external_globals_1 = __importDefault(require("rollup-plugin-
|
|
|
57
57
|
// import { visualizer } from 'rollup-plugin-visualizer';
|
|
58
58
|
const typescript_1 = __importDefault(require("typescript"));
|
|
59
59
|
const ufo_1 = require("ufo");
|
|
60
|
+
const vite_plugin_css_injected_by_js_1 = __importDefault(require("vite-plugin-css-injected-by-js"));
|
|
60
61
|
const vite_plugin_node_polyfills_1 = require("vite-plugin-node-polyfills");
|
|
61
62
|
const vite_plugin_react_pages_1 = __importStar(require("vite-plugin-react-pages"));
|
|
62
63
|
const helper_1 = require("../utils/helper");
|
|
@@ -190,7 +191,7 @@ function initBlockStudioPlugins(options) {
|
|
|
190
191
|
},
|
|
191
192
|
build: Object.assign(Object.assign({}, _config === null || _config === void 0 ? void 0 : _config.build), {
|
|
192
193
|
// sourcemap: true,
|
|
193
|
-
cssCodeSplit:
|
|
194
|
+
cssCodeSplit: true, lib: {
|
|
194
195
|
name,
|
|
195
196
|
entry: Object.assign({}, Object.fromEntries(entryList)),
|
|
196
197
|
formats,
|
|
@@ -260,6 +261,8 @@ function initBlockStudioPlugins(options) {
|
|
|
260
261
|
}),
|
|
261
262
|
}),
|
|
262
263
|
}),
|
|
264
|
+
(0, vite_plugin_html_transform_1.initHtmlPreviewTransformPlugin)(),
|
|
265
|
+
(0, vite_plugin_css_injected_by_js_1.default)(),
|
|
263
266
|
// https://github.com/rollup/plugins/tree/master/packages/typescript#noforceemit
|
|
264
267
|
// typescript({
|
|
265
268
|
// declaration: true,
|
|
@@ -268,14 +271,13 @@ function initBlockStudioPlugins(options) {
|
|
|
268
271
|
// declarationDir: path.resolve(workingDir, 'lib/types'),
|
|
269
272
|
// rootDir: path.resolve(workingDir),
|
|
270
273
|
// }),
|
|
271
|
-
(0, vite_plugin_html_transform_1.initHtmlPreviewTransformPlugin)(),
|
|
272
274
|
// initRemoteScriptLocalizerPlugin({
|
|
273
275
|
// tempDir: 'temp/remote-scripts', // 可选,默认值
|
|
274
276
|
// maxConcurrent: 5, // 可选,默认值
|
|
275
277
|
// timeout: 30 * 1000, // 可选,默认值 30 秒
|
|
276
278
|
// }),
|
|
277
279
|
{
|
|
278
|
-
name: 'build-
|
|
280
|
+
name: 'post-build-file-transpiler',
|
|
279
281
|
apply: 'build',
|
|
280
282
|
enforce: 'post',
|
|
281
283
|
writeBundle(options) {
|