Skip to content

Commit bc905d5

Browse files
committed
修正
1 parent 3ddb725 commit bc905d5

7 files changed

+1507
-1996
lines changed

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ module.exports = function(api) {
7979
]
8080
].filter(Boolean)
8181
}
82-
}
82+
}

config/webpack.config.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ module.exports = {
55
mode: 'production',
66
entry: './app/javascript/packs/application.js',
77
output: {
8-
filename: 'main.js',
9-
path: path.resolve(__dirname, 'app/assets/builds'),
8+
filename: 'js/[name]-[contenthash].js',
9+
chunkFilename: 'js/[name]-[contenthash].chunk.js',
10+
path: path.resolve(__dirname, 'public/packs'),
11+
publicPath: '/packs/'
1012
},
1113
module: {
1214
rules: [
@@ -27,12 +29,11 @@ module.exports = {
2729
},
2830
plugins: [
2931
new MiniCssExtractPlugin({
30-
filename: '[name].css'
32+
filename: 'css/[name]-[contenthash].css',
33+
chunkFilename: 'css/[name]-[contenthash].chunk.css'
3134
})
3235
],
3336
resolve: {
34-
fallback: {
35-
global: require.resolve('global')
36-
}
37+
extensions: ['.js', '.scss', '.css']
3738
}
3839
};

config/webpack/environment.js

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
const { environment } = require('@rails/webpacker')
2-
const webpack = require('webpack')
3-
4-
environment.plugins.prepend('Provide',
5-
new webpack.ProvidePlugin({
6-
$: 'jquery',
7-
jQuery: 'jquery'
8-
})
9-
)
102

113
module.exports = environment

config/webpack/production.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production'
22

33
const environment = require('./environment')
44

5-
module.exports = environment.toWebpackConfig()
5+
const config = environment.toWebpackConfig()
6+
7+
// 問題のある node 設定を削除
8+
delete config.node
9+
10+
module.exports = config

config/webpacker.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ default: &default
77
public_output_path: packs
88
cache_path: tmp/cache/webpacker
99
webpack_compile_output: true
10-
additional_paths: ['app/javascript/stylesheets']
1110

1211
# Additional paths webpack should lookup modules
1312
# ['app/assets', 'engine/foo/app/assets']
14-
#additional_paths: []
13+
additional_paths: []
1514

1615
# Reload manifest.json on all requests so we reload latest compiled packs
1716
cache_manifest: false

package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,32 @@
2020
"babel-loader": "^8.2.0",
2121
"babel-plugin-macros": "^3.1.0",
2222
"bootstrap": "^5.3.3",
23-
"css-loader": "^6.8.1",
23+
"css-loader": "5.2.7",
2424
"global": "^4.4.0",
2525
"jquery": "^3.7.1",
26-
"mini-css-extract-plugin": "^2.7.6",
26+
"mini-css-extract-plugin": "1.6.2",
2727
"sass": "^1.77.8",
28-
"sass-loader": "^13.3.2",
29-
"style-loader": "^3.3.3",
28+
"sass-loader": "10.1.1",
29+
"style-loader": "2",
3030
"turbolinks": "^5.2.0",
31-
"webpack": "^5.88.0",
32-
"webpack-cli": "^4.10.0"
31+
"webpack": "4.46.0",
32+
"webpack-cli": "3.3.12"
3333
},
3434
"version": "0.1.0",
3535
"main": "index.js",
3636
"repository": "[email protected]:YuzukiEndo/recipi_ai_assistant.git",
3737
"author": "YuzukiEndo ",
3838
"license": "MIT",
3939
"devDependencies": {
40-
"webpack-dev-server": "^4.15.1"
40+
"webpack-dev-server": "^3"
4141
},
4242
"scripts": {
4343
"start": "node index.js",
4444
"build": "webpack --config webpack.config.js",
4545
"heroku-postbuild": "webpack --config webpack.config.js"
4646
},
4747
"engines": {
48-
"node": "16.x"
48+
"node": "16.x",
49+
"yarn": "1.22.x"
4950
}
5051
}

yarn.lock

+1,483-1,970
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)