File tree Expand file tree Collapse file tree 5 files changed +41
-19
lines changed
Expand file tree Collapse file tree 5 files changed +41
-19
lines changed Original file line number Diff line number Diff line change 1515 "buildnode" : " webpack --config webpack/webpack.node.js" ,
1616 "buildweb" : " webpack -p --config webpack/webpack.web.js" ,
1717 "buildreactnative" : " webpack --config webpack/webpack.react-native.js" ,
18- "buildall" : " npm run buildnode; npm run buildweb; npm run buildreactnative" ,
18+ "buildall" : " npm run buildnode& npm run buildweb& npm run buildreactnative" ,
1919 "generate-docs" : " node_modules/.bin/jsdoc --configure docs-config.json --verbose"
2020 },
2121 "repository" : {
7070 "webpack" : " 2.2.1" ,
7171 "webpack-md5-hash" : " 0.0.5" ,
7272 "webpack-merge" : " 0.17.0" ,
73- "babel-runtime" : " 6.23.0"
73+ "babel-runtime" : " 6.23.0" ,
74+ "string-replace-loader" : " 1.3.0"
7475 },
7576 "dependencies" : {
7677 "isomorphic-fetch" : " 2.2.1" ,
Original file line number Diff line number Diff line change 1- var webpack = require ( 'webpack' ) ;
2- var path = require ( 'path' ) ;
1+ 'use strict' ;
32
3+ const webpack = require ( 'webpack' ) ;
4+ const path = require ( 'path' ) ;
5+
6+ const Package = require ( './../package.json' ) ;
7+
48module . exports = function ( options ) {
59 return {
610
@@ -14,17 +18,27 @@ module.exports = function (options) {
1418
1519 module : {
1620 rules : [
17- {
18- test : / \. j s ? $ / ,
19- exclude : [ '../node_modules' ] ,
20- use : [ {
21+ {
22+ test : / \. j s ? $ / ,
23+ exclude : [ '../node_modules' ] ,
24+ use : [
25+ {
2126 loader :'babel-loader' ,
2227 options : {
2328 presets : [ 'es2015' ] ,
2429 }
25- } ] ,
30+ } ,
31+ {
32+ loader :'string-replace-loader' ,
33+ query : {
34+ search : '{{VERSION}}' ,
35+ replace : Package . version
36+ }
37+ }
38+ ] ,
2639 }
2740 ]
41+
2842 } ,
2943
3044 plugins : [
Original file line number Diff line number Diff line change 1- var path = require ( 'path' ) ;
2- var webpackMerge = require ( 'webpack-merge' ) ;
3- var commonConfig = require ( './webpack.common.js' ) ;
1+ 'use strict' ;
2+ const path = require ( 'path' ) ;
3+ const webpackMerge = require ( 'webpack-merge' ) ;
4+
5+ const commonConfig = require ( './webpack.common.js' ) ;
46
57module . exports = function ( options ) {
68 return webpackMerge ( commonConfig ( ) , {
Original file line number Diff line number Diff line change 1- var path = require ( 'path' ) ;
2- var webpackMerge = require ( 'webpack-merge' ) ;
3- var commonConfig = require ( './webpack.common.js' ) ;
1+ 'use strict' ;
2+
3+ const path = require ( 'path' ) ;
4+ const webpackMerge = require ( 'webpack-merge' ) ;
5+
6+ const commonConfig = require ( './webpack.common.js' ) ;
47
58module . exports = function ( options ) {
69 return webpackMerge ( commonConfig ( ) , {
@@ -10,7 +13,6 @@ module.exports = function (options) {
1013 path : path . join ( __dirname , "../dist/react-native" ) ,
1114 filename : "contentstack.js"
1215 } ,
13- target : "node" ,
1416 resolve : {
1517 alias :{
1618 runtime : path . resolve ( __dirname , '../src/runtime/react-native' )
Original file line number Diff line number Diff line change 1- var path = require ( 'path' ) ;
2- var webpackMerge = require ( 'webpack-merge' ) ;
3- var commonConfig = require ( './webpack.common.js' ) ;
1+ 'use strict' ;
2+
3+ const path = require ( 'path' ) ;
4+ const webpackMerge = require ( 'webpack-merge' ) ;
5+
6+ const commonConfig = require ( './webpack.common.js' ) ;
47
58module . exports = function ( options ) {
69 return webpackMerge ( commonConfig ( ) , {
You can’t perform that action at this time.
0 commit comments