Skip to content

Commit ee22a7b

Browse files
committed
feat!: build as ESM-Only, drop CJS
1 parent eef34a4 commit ee22a7b

File tree

11 files changed

+23
-1145
lines changed

11 files changed

+23
-1145
lines changed

packages/demo/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"dev": "vite",
77
"build": "tsc && vite build",
8-
"preview": "vite preview",
9-
"standalone:require": "node ./src/examples/example-standalone-require.cjs"
8+
"preview": "vite preview"
109
},
1110
"dependencies": {
1211
"@excel-builder-vanilla/types": "workspace:*",

packages/demo/src/examples/example-standalone-require.cjs

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/demo/src/getting-started.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,14 @@ <h5>CDN</h5>
2222
Excel-Builder-Vanilla. Just use the following CDN links.
2323
</p>
2424
<p>
25-
The project now ships its <code>.js</code> files as ESM by default, if you still wish to use the old CommonJS (CJS) format with
26-
<code>require()</code>, then you will have to use <code>.cjs</code> file extension.
25+
The project now ships as ESM-Only, if you still wish to use the legacy CommonJS (CJS) format with <code>require()</code>,
26+
then use previous 3.x version.
2727
</p>
2828

2929
<div style="background: #f7f7f7; padding: 10px">
3030
<pre>
3131
&lt;!-- (IIFE Standalone Script) Latest compiled and minified JavaScript --&gt;
32-
&lt;script type=&quot;module&quot; src=&quot;<span style="color:#880000">https://cdn.jsdelivr.net/npm/[email protected]/dist/excel-builder.iife.js</span>&quot;&gt;&lt;/script&gt;
33-
34-
&lt;!-- (CJS Files <span style="color:#d63384">.cjs</span> extension) Latest compiled and minified JavaScript --&gt;
35-
&lt;script src=&quot;<span style="color:#880000">https://cdn.jsdelivr.net/npm/[email protected]/dist/excel-builder.cjs</span>&quot;&gt;&lt;/script&gt;</pre>
32+
&lt;script type=&quot;module&quot; src=&quot;<span style="color:#880000">https://cdn.jsdelivr.net/npm/[email protected]/dist/excel-builder.iife.js</span>&quot;&gt;&lt;/script&gt;
3633
</div>
3734

3835
<quote>
@@ -58,7 +55,7 @@ <h5>NPM</h5>
5855
</div>
5956
</section>
6057

61-
<h5>CommonJS <code>require()</code> / ESM <code>import from</code></h5>
58+
<h5>ESM <code>import from</code></h5>
6259
<p>The library provides both CommonJS or ESM, see the example below:</p>
6360
<div style="background: #f7f7f7; padding: 10px">
6461
<pre>

packages/demo/vite.config.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ const base64Loader: Plugin = {
1616

1717
export default defineConfig({
1818
base: './',
19+
css: {
20+
preprocessorOptions: {
21+
scss: {
22+
quietDeps: true,
23+
},
24+
},
25+
},
1926
server: {
2027
port: 3000,
2128
cors: true,

packages/excel-builder-vanilla-types/dist/index.cjs

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)