Skip to content

Commit

Permalink
Babel config
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperwalter committed Mar 13, 2021
1 parent 622682c commit 1368ec9
Show file tree
Hide file tree
Showing 9 changed files with 1,123 additions and 7 deletions.
4 changes: 4 additions & 0 deletions JS/samuraj-programowania/nodejs/webpack4/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-env"],
"plugins": []
}
2 changes: 1 addition & 1 deletion JS/samuraj-programowania/nodejs/webpack4/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ <h1>Nasza strona</h1>

<footer>Stopka</footer>

<script type="text/javascript" src="js/e1d2e2.main.js"></script></body>
<script type="text/javascript" src="js/fde1b4.main.js"></script></body>
</html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ const webpackConfig = {
{
test: /\.(jpg|png|svg|gif|jpeg)$/,
use: 'file-loader',
}
},
{
test: /\.js$/,
loader: ['babel-loader'],
exclude: /node_modules/, // nie transpilujemy node-modules
},
],
},
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ const webpackConfig = {
progressive: true,
}
}
}],

}
}],
},
{
test: /\.js$/,
loader: ['babel-loader'],
exclude: /node_modules/, // nie transpilujemy node-modules
},
],
},
plugins: [
Expand Down

0 comments on commit 1368ec9

Please sign in to comment.