Created
January 31, 2020 06:49
-
-
Save dongsik-yoo/41db1ada47c91770b95d6c5b0cd9c039 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const postcssPrefixer = require('postcss-prefixer'); | |
... | |
const isDevServer = process.env.DEV_SERVER === 'true'; | |
... | |
module: { | |
rules: [ | |
... | |
{ | |
test: /\.s[ac]ss$/i, | |
use: [ | |
isDevServer ? 'style-loader' : MiniCssExtractPlugin.loader, | |
{ | |
loader: 'css-loader', | |
options: { | |
sourceMap: true | |
} | |
}, | |
{ | |
loader: 'postcss-loader', | |
options: { | |
sourceMap: true, | |
plugins: [ | |
postcssPrefixer({ | |
prefix: 'tui-full-calendar-' | |
}) | |
] | |
} | |
}, | |
{ | |
loader: 'sass-loader', | |
options: { | |
sourceMap: true | |
} | |
} | |
] | |
}, | |
{ | |
test: /\.(gif|png|jpe?g)$/, | |
use: 'url-loader' | |
} | |
] | |
}, | |
plugins: [ | |
..., | |
new MiniCssExtractPlugin({ | |
filename: `${FILENAME}.css` | |
}) | |
] | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment