mirror of
https://github.com/aelve/guide.git
synced 2024-12-23 12:52:31 +03:00
css and stylus loaders moved to base webpack confing
This commit is contained in:
parent
5532e5c1f1
commit
7d53a04290
@ -3,6 +3,7 @@ const path = require('path')
|
||||
const { VueLoaderPlugin } = require('vue-loader')
|
||||
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||
const TSLintPlugin = require('tslint-webpack-plugin')
|
||||
const { cssLoader, stylusLoader } = require('./style-loader.conf')
|
||||
|
||||
const { clientPort, ssrPort } = require('./build-config')
|
||||
const isDev = process.env.NODE_ENV === 'development'
|
||||
@ -27,6 +28,8 @@ module.exports = {
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
cssLoader,
|
||||
stylusLoader,
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
|
@ -6,7 +6,6 @@ const merge = require('webpack-merge')
|
||||
const VueClientPlugin = require('vue-server-renderer/client-plugin')
|
||||
|
||||
const { appName, clientPort, distPath, env } = require('./build-config')
|
||||
const { cssLoader, stylusLoader } = require('./style-loader.conf')
|
||||
const baseConfig = require('./webpack.base.conf')
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
@ -21,13 +20,6 @@ const webpackConfig = merge(baseConfig, {
|
||||
filename: `static/js/[name].${isProduction ? '[hash].' : ''}js`
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
cssLoader,
|
||||
stylusLoader
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new VueClientPlugin(),
|
||||
|
||||
|
@ -7,7 +7,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const VueServerPlugin = require('vue-server-renderer/server-plugin')
|
||||
const axios = require('axios')
|
||||
const { distPath, env, ssrPort } = require('./build-config')
|
||||
const { cssLoader, stylusLoader } = require('./style-loader.conf')
|
||||
const baseConfig = require('./webpack.base.conf')
|
||||
|
||||
axios.defaults.baseURL = `http://localhost:${ssrPort}`
|
||||
@ -33,12 +32,6 @@ const webpackConfig = merge(baseConfig, {
|
||||
]
|
||||
}),
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
cssLoader, stylusLoader
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new VueServerPlugin(),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user