@@ -4,7 +4,7 @@ const BundleAnalyzerPlugin =
44
55function generateConfig ( name ) {
66 var config = {
7- entry : './lib /index.js' ,
7+ entry : './dist/cjs /index.js' ,
88 output : {
99 path : path . resolve ( __dirname , '../dist' ) ,
1010 filename : name + '.js' ,
@@ -19,9 +19,9 @@ function generateConfig(name) {
1919 // Add '.ts' and '.tsx' as resolvable extensions.
2020 extensions : [ '.webpack.js' , '.web.js' , '.ts' , '.tsx' , '.js' ] ,
2121 alias : {
22- [ path . resolve ( __dirname , '../lib /util/node-support.js' ) ] : path . resolve (
22+ [ path . resolve ( __dirname , '../dist/cjs /util/node-support.js' ) ] : path . resolve (
2323 __dirname ,
24- '../lib /util/browser-support.js' ,
24+ '../dist/cjs /util/browser-support.js' ,
2525 ) ,
2626 } ,
2727 fallback : {
@@ -34,31 +34,7 @@ function generateConfig(name) {
3434
3535 module : {
3636 rules : [
37- // All files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'.
38- { test : / \. t s x ? $ / , loader : 'ts-loader' } ,
39-
40- // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
41- { test : / \. j s $ / , loader : 'source-map-loader' } ,
42-
43- {
44- test : / \. m ? j s $ / ,
45- exclude : / ( n o d e _ m o d u l e s | b o w e r _ c o m p o n e n t s | s a m p l e s | l i b | t e s t | c o v e r a g e ) / ,
46- use : {
47- loader : 'babel-loader' ,
48- options : {
49- presets : [
50- [
51- '@babel/preset-env' ,
52- {
53- targets : {
54- node : 'current' ,
55- } ,
56- } ,
57- ] ,
58- ] ,
59- } ,
60- } ,
61- } ,
37+ // Code is already transpiled from TypeScript, no additional loaders needed
6238 ] ,
6339 } ,
6440 } ;
0 commit comments