File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " instantsearch.js" ,
3
3
"version" : " 0.8.0" ,
4
4
"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" ,
6
6
"author" : " Algolia <support@algolia.com>" ,
7
7
"scripts" : {
8
8
"build" : " ./scripts/build.sh" ,
15
15
"test" : " BABEL_ENV=test mocha --opts mocha.opts --reporter dot && npm run lint" ,
16
16
"test:watch" : " BABEL_ENV=test mocha --opts mocha.opts --reporter min --watch" ,
17
17
"test:watch:browser" : " BABEL_ENV=test karma start" ,
18
- "watch" : " webpack --watch" ,
19
18
"shrinkwrap" : " npm-shrinkwrap --dev"
20
19
},
21
20
"repository" : " algolia/instantsearch.js" ,
36
35
"eslint-plugin-react" : " ^3.6.3" ,
37
36
"expect" : " ^1.12.2" ,
38
37
"expect-jsx" : " ^2.1.0" ,
38
+ "expose-loader" : " ^0.7.0" ,
39
39
"gh-pages" : " ^0.4.0" ,
40
40
"jsdoc-parse" : " ^1.1.1" ,
41
41
"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
8
8
9
9
bundle=' instantsearch'
10
10
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
12
15
13
16
for source in " $ROOT " /css/[^_]* .scss; do
14
17
base=` basename " $source " .scss`
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ export default {
11
11
module : {
12
12
loaders : [ {
13
13
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'
14
18
} ]
15
19
} ,
16
20
plugins : [
You can’t perform that action at this time.
0 commit comments