File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 22 "name" : " instantsearch.js" ,
33 "version" : " 0.8.0" ,
44 "description" : " instantsearch.js is a library of widgets to build high performance instant search experiences using Algolia" ,
5- "main" : " dist/instantsearch.js" ,
5+ "main" : " dist/instantsearch.module. js" ,
66 "author" : " Algolia <support@algolia.com>" ,
77 "scripts" : {
88 "build" : " ./scripts/build.sh" ,
1515 "test" : " BABEL_ENV=test mocha --opts mocha.opts --reporter dot && npm run lint" ,
1616 "test:watch" : " BABEL_ENV=test mocha --opts mocha.opts --reporter min --watch" ,
1717 "test:watch:browser" : " BABEL_ENV=test karma start" ,
18- "watch" : " webpack --watch" ,
1918 "shrinkwrap" : " npm-shrinkwrap --dev"
2019 },
2120 "repository" : " algolia/instantsearch.js" ,
3635 "eslint-plugin-react" : " ^3.6.3" ,
3736 "expect" : " ^1.12.2" ,
3837 "expect-jsx" : " ^2.1.0" ,
38+ "expose-loader" : " ^0.7.0" ,
3939 "gh-pages" : " ^0.4.0" ,
4040 "jsdoc-parse" : " ^1.1.1" ,
4141 "jsdoc-to-markdown" : " ^1.2.0" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ license="/*! instantsearch.js ${VERSION:-UNRELEASED} | © Algolia Inc. and other
88
99bundle=' instantsearch'
1010
11- webpack
11+ # build for jsdelivr, with everything inlined while exposing React + ReactDOM (for plugins)
12+ webpack --config webpack.config.jsdelivr.babel.js
13+ # only transpile to ES5 for package.json main entry
14+ babel index.js -o dist/${bundle} .module.js
1215
1316for source in " $ROOT " /css/[^_]* .scss; do
1417 base=` basename " $source " .scss`
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ export default {
1111 module : {
1212 loaders : [ {
1313 test : / \. j s $ / , exclude : / n o d e _ m o d u l e s / , loader : 'babel'
14+ } , {
15+ test : require . resolve ( 'react' ) , loader : 'expose?React'
16+ } , {
17+ test : require . resolve ( 'react-dom' ) , loader : 'expose?ReactDOM'
1418 } ]
1519 } ,
1620 plugins : [
You can’t perform that action at this time.
0 commit comments