File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,23 @@ wasmPkg.type = 'module';
5454wasmPkg . main = 'index.mjs' ;
5555wasmPkg . module = 'index.mjs' ;
5656wasmPkg . exports = {
57- types : './index.d.ts' ,
58- node : {
59- import : './wasm-node.mjs' ,
60- require : './wasm-node.cjs' ,
57+ '.' : {
58+ types : './index.d.ts' ,
59+ node : {
60+ import : './wasm-node.mjs' ,
61+ require : './wasm-node.cjs'
62+ } ,
63+ default : {
64+ import : './index.mjs' ,
65+ require : './index.cjs'
66+ }
6167 } ,
62- default : {
63- import : './index.mjs' ,
64- require : './index.cjs' ,
68+ // Allow esbuild to import the wasm file
69+ // without copying it in the src directory.
70+ // Simplifies loading it in the browser when used in a library.
71+ './lightningcss_node.wasm' : {
72+ import : './lightningcss_node.wasm' ,
73+ require : './lightningcss_node.wasm'
6574 }
6675} ;
6776wasmPkg . types = 'index.d.ts' ;
You can’t perform that action at this time.
0 commit comments