parent
79cbe63067
commit
23ac0fef32
@ -9,6 +9,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@import "../css/style.css";
|
||||||
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const constants = require("../js/constants");
|
const constants = require("../js/constants");
|
||||||
import Mousetrap from "mousetrap";
|
import Mousetrap from "mousetrap";
|
||||||
|
@ -13,6 +13,19 @@ module.exports = (app) => {
|
|||||||
"webpack-hot-middleware/client?path=storage/__webpack_hmr"
|
"webpack-hot-middleware/client?path=storage/__webpack_hmr"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Enable hot module reload support in mini-css-extract-plugin
|
||||||
|
for (const rule of webpackConfig.module.rules) {
|
||||||
|
if (!Array.isArray(rule.use)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const use of rule.use) {
|
||||||
|
if (use.options && typeof use.options.hmr !== "undefined") {
|
||||||
|
use.options.hmr = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const compiler = webpack(webpackConfig);
|
const compiler = webpack(webpackConfig);
|
||||||
|
|
||||||
app.use(
|
app.use(
|
||||||
|
@ -11,7 +11,6 @@ const config = {
|
|||||||
mode: process.env.NODE_ENV === "production" ? "production" : "development",
|
mode: process.env.NODE_ENV === "production" ? "production" : "development",
|
||||||
entry: {
|
entry: {
|
||||||
"js/bundle.js": [path.resolve(__dirname, "client/js/vue.js")],
|
"js/bundle.js": [path.resolve(__dirname, "client/js/vue.js")],
|
||||||
"css/style": path.resolve(__dirname, "client/css/style.css"),
|
|
||||||
},
|
},
|
||||||
devtool: "source-map",
|
devtool: "source-map",
|
||||||
output: {
|
output: {
|
||||||
@ -37,9 +36,13 @@ const config = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
include: [path.resolve(__dirname, "client")],
|
|
||||||
use: [
|
use: [
|
||||||
MiniCssExtractPlugin.loader,
|
{
|
||||||
|
loader: MiniCssExtractPlugin.loader,
|
||||||
|
options: {
|
||||||
|
hmr: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
loader: "css-loader",
|
loader: "css-loader",
|
||||||
options: {
|
options: {
|
||||||
@ -83,8 +86,10 @@ const config = {
|
|||||||
json3: "JSON", // socket.io uses json3.js, but we do not target any browsers that need it
|
json3: "JSON", // socket.io uses json3.js, but we do not target any browsers that need it
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new MiniCssExtractPlugin(),
|
|
||||||
new VueLoaderPlugin(),
|
new VueLoaderPlugin(),
|
||||||
|
new MiniCssExtractPlugin({
|
||||||
|
filename: "css/style.css",
|
||||||
|
}),
|
||||||
new CopyPlugin([
|
new CopyPlugin([
|
||||||
{
|
{
|
||||||
from: "./node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff*",
|
from: "./node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff*",
|
||||||
|
Loading…
Reference in New Issue
Block a user