質問編集履歴
1
webpack.config.jsに前に試したコードを貼り付けていました, 申し訳ないです.
test
CHANGED
File without changes
|
test
CHANGED
@@ -100,52 +100,64 @@
|
|
100
100
|
|
101
101
|
module.exports = {
|
102
102
|
|
103
|
+
entry: {
|
104
|
+
|
103
|
-
|
105
|
+
app: "./src/index.js"
|
106
|
+
|
107
|
+
},
|
104
108
|
|
105
109
|
output: {
|
106
110
|
|
107
|
-
|
111
|
+
path: __dirname + '/public/js',
|
108
112
|
|
109
|
-
|
113
|
+
filename: "[name].js"
|
110
|
-
|
111
|
-
publicPath: '/'
|
112
114
|
|
113
115
|
},
|
114
116
|
|
115
|
-
devServer: {
|
117
|
+
devServer: {
|
116
118
|
|
117
|
-
|
119
|
+
contentBase: __dirname + '/public',
|
118
120
|
|
121
|
+
port: 8080,
|
122
|
+
|
119
|
-
|
123
|
+
publicPath: '/js/'
|
120
124
|
|
121
125
|
},
|
122
126
|
|
127
|
+
devtool: "eval-source-map",
|
128
|
+
|
129
|
+
mode: 'development',
|
130
|
+
|
123
131
|
module: {
|
124
132
|
|
125
|
-
|
133
|
+
rules: [{
|
126
134
|
|
127
|
-
|
135
|
+
test: /.js$/,
|
128
136
|
|
129
|
-
|
137
|
+
enforce: "pre",
|
130
138
|
|
131
|
-
|
139
|
+
exclude: /node_modules/,
|
132
140
|
|
133
|
-
|
141
|
+
loader: "eslint-loader"
|
134
142
|
|
135
|
-
|
143
|
+
}, {
|
136
144
|
|
137
|
-
|
145
|
+
test: /.css$/,
|
138
146
|
|
139
|
-
|
147
|
+
loader: ["style-loader","css-loader"]
|
140
148
|
|
141
|
-
|
149
|
+
}, {
|
142
150
|
|
151
|
+
test: /.js$/,
|
152
|
+
|
153
|
+
exclude: /node_modules/,
|
154
|
+
|
155
|
+
loader: 'babel-loader'
|
156
|
+
|
143
|
-
|
157
|
+
}]
|
144
158
|
|
145
159
|
}
|
146
160
|
|
147
|
-
|
148
|
-
|
149
|
-
};
|
161
|
+
};
|
150
162
|
|
151
163
|
```
|