Skip to content

Commit aa822be

Browse files
committedDec 9, 2019
[chore] it's not necessary to make chunks when running the examples.
1 parent eb20444 commit aa822be

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed
 

‎examples/basic/index.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ <h2>an accessible React modal dialog component</h2>
1414
</header>
1515
<div id="example" class="padbox"></div>
1616
<a target="_top" href="https://github.com/reactjs/react-modal"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github-camo.global.ssl.fastly.net/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
17-
<script src="../__build__/shared.js"></script>
18-
<script src="../__build__/basic.js"></script>
17+
<script src="../__build__/basic.js" type="application/javascript"></script>
1918
</body>
2019
</html>

‎examples/bootstrap/index.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ <h2>an accessible React modal dialog component</h2>
1414
</header>
1515
<div id="example" class="padbox"></div>
1616
<a target="_top" href="https://github.com/reactjs/react-modal"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github-camo.global.ssl.fastly.net/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
17-
<script src="../__build__/shared.js"></script>
18-
<script src="../__build__/bootstrap.js"></script>
17+
<script type="application/javascript" src="/__build__/bootstrap.js"></script>
1918
</body>
2019
</html>

‎webpack.config.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,20 @@ function buildEntries() {
2424

2525
module.exports = {
2626
mode: 'development',
27-
2827
entry: buildEntries(),
29-
3028
output: {
3129
filename: '[name].js',
32-
chunkFilename: '[id].chunk.js',
3330
path: path.resolve(__dirname, './examples/__build__'),
3431
publicPath: '/__build__/'
3532
},
36-
3733
module: {
3834
rules: [
3935
{ test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader' } }
4036
]
4137
},
42-
4338
resolve: {
4439
alias: {
4540
"react-modal": path.resolve(__dirname, "./src")
4641
}
47-
},
48-
49-
optimization: {
50-
splitChunks: {
51-
chunks: 'all'
52-
}
53-
},
54-
55-
plugins: [
56-
new webpack.LoaderOptionsPlugin({ debug: true })
57-
]
42+
}
5843
};

0 commit comments

Comments
 (0)