Remove cpexcel.js in webpack #438

Closed
opened 2016-07-14 13:10:33 +00:00 by rusty1s · 1 comment
rusty1s commented 2016-07-14 13:10:33 +00:00 (Migrated from github.com)

When I build my project with this module via webpack and the following configuration:

node: {
    fs: 'empty',
  },
  externals: [
    { './jszip': 'jszip' },
    { './cptable': 'var cptable' },
  ],

it gets really large. I noticed that rows like

D[152] = "�����������������������������������������������������������������쁀쁁쁂쁃쁄쁅쁆쁇쁈쁉쁊쁋

are also included in my bundle file. How can i remove cpexcel.js, so that it gets no longer included?

Thanks.

When I build my project with this module via webpack and the following configuration: ``` js node: { fs: 'empty', }, externals: [ { './jszip': 'jszip' }, { './cptable': 'var cptable' }, ], ``` it gets really large. I noticed that rows like ``` js D[152] = "�����������������������������������������������������������������쁀쁁쁂쁃쁄쁅쁆쁇쁈쁉쁊쁋 ``` are also included in my bundle file. How can i remove `cpexcel.js`, so that it gets no longer included? Thanks.
SheetJSDev commented 2017-03-13 02:15:57 +00:00 (Migrated from github.com)

@rusty1s those are coming from the codepage library, which is needed for XLS files and some other corner cases. If you don't expect to have to deal with XLS files (say, if you know the source is always producing XLSX or XLSB files), then you can safely suppress it by using webpack resolve:

	resolve: {
		alias: { "./dist/cpexcel.js": "" }
	}

This will be added to the README

@rusty1s those are coming from [the codepage library](https://github.com/sheetjs/js-codepage), which is needed for XLS files and some other corner cases. If you don't expect to have to deal with XLS files (say, if you know the source is always producing XLSX or XLSB files), then you can safely suppress it by using webpack resolve: ```js resolve: { alias: { "./dist/cpexcel.js": "" } } ``` This will be added to the README
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#438
No description provided.