Skip to content

Instantly share code, notes, and snippets.

@thanapongp
Last active September 7, 2019 03:43
Show Gist options
  • Select an option

  • Save thanapongp/67f1aca56f7f52bccbd5d7d73a3fd018 to your computer and use it in GitHub Desktop.

Select an option

Save thanapongp/67f1aca56f7f52bccbd5d7d73a3fd018 to your computer and use it in GitHub Desktop.
Personal's website webpack.config.js
module.exports = {
entry: './src/styles.css',
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
use: [
{ loader: 'css-loader', options: { importLoader: 1 } },
'postcss-loader'
],
fallback: 'style-loader'
})
}
]
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'src/index.html'
}),
],
output: {
path: path.resolve(__dirname, 'dist'),
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment