Skip to content

Commit

Permalink
Fix webpack config and remove useless files
Browse files Browse the repository at this point in the history
  • Loading branch information
kinoppyd committed Oct 29, 2023
1 parent 0160e99 commit de503c2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 40 deletions.
3 changes: 3 additions & 0 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// Entry point for the build script in your package.json
var componentRequireContext = require.context("./components", true);
var ReactRailsUJS = require("react_ujs");
ReactRailsUJS.useContext(componentRequireContext);
4 changes: 0 additions & 4 deletions app/javascript/packs/application.js

This file was deleted.

26 changes: 0 additions & 26 deletions app/javascript/packs/hello_react.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions app/javascript/packs/hello_typescript.ts

This file was deleted.

5 changes: 0 additions & 5 deletions app/javascript/packs/server_rendering.js

This file was deleted.

14 changes: 13 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,17 @@ module.exports = {
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
]
],
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
module: {
rules: [
{
test: /\.(js|jsx|ts|tsx|)$/,
exclude: /node_modules/,
use: ['babel-loader'],
}
]
}
}

0 comments on commit de503c2

Please sign in to comment.