From 095cd0c90c272727661811619ade5072648c625b Mon Sep 17 00:00:00 2001 From: x ronger Date: Sun, 18 Oct 2020 18:57:17 +0800 Subject: [PATCH] update nuxt.config.js txt loader --- nuxt.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nuxt.config.js b/nuxt.config.js index 012ef54..5be9b31 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,6 +1,7 @@ import appConfig from './config/app.config' import apiConfig from './config/api.config' import {isDevMode} from './environment' + const LodashModuleReplacementPlugin = require('lodash-webpack-plugin') export default { @@ -8,7 +9,7 @@ export default { ** Nuxt rendering mode ** See https://nuxtjs.org/api/configuration-mode */ - mode: 'universal', + ssr: true, /* ** Render configuration */ @@ -96,6 +97,7 @@ export default { extend(config, ctx) { config.plugins.unshift(new LodashModuleReplacementPlugin()) // rules[2].use[0] is babel-loader + config.module.rules.push({ test: /\.txt$/, use: 'raw-loader' }) config.module.rules[2].use[0].options.plugins = ['lodash'] } }