0.2 release
This commit is contained in:
parent
747c6416d4
commit
18479a3f56
340 changed files with 27295 additions and 0 deletions
35
webpack.common.babel.js
Normal file
35
webpack.common.babel.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import { resolve } from 'path';
|
||||
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||
|
||||
export default {
|
||||
entry: {
|
||||
main: ['./src/newsreader/js/index.js', './src/newsreader/scss/index.scss'],
|
||||
},
|
||||
output: {
|
||||
path: resolve(__dirname, 'src', 'newsreader', 'static'),
|
||||
filename: 'js/[name].bundle.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js|jsx)$/,
|
||||
exclude: /node_modules/,
|
||||
use: { loader: 'babel-loader' },
|
||||
},
|
||||
{
|
||||
test: /\.(sass|scss)$/,
|
||||
use: [{ loader: MiniCssExtractPlugin.loader }, 'css-loader', 'sass-loader'],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'css/main.css',
|
||||
allChunks: true,
|
||||
}),
|
||||
new CleanWebpackPlugin({
|
||||
cleanOnceBeforeBuildPatterns: ['**/*', '!favicon.png'],
|
||||
}),
|
||||
],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue