Skip to content

Commit

Permalink
started on mini-css-extract-plugin but causes tests not to run... :/
Browse files Browse the repository at this point in the history
  • Loading branch information
devlinjunker committed May 3, 2020
1 parent 5e30f49 commit 97567e5
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 2 deletions.
2 changes: 2 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const env = {
const webpack = buildWebpack(env);
webpack.watch = true;

console.log('TEST');

const karmaConfig = function(config) {
config.set({

Expand Down
93 changes: 93 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"karma-webpack": "^3.0.5",
"list-selectors": "^2.0.0",
"madge": "^3.8.0",
"mini-css-extract-plugin": "^0.9.0",
"mocha": "^6.2.3",
"postcss-exclude-files": "^1.0.15",
"postcss-loader": "^3.0.0",
Expand Down
6 changes: 6 additions & 0 deletions test/test.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ chai.use(sinonChai);
global.expect = chai.expect;
global.sandbox = sinon.createSandbox();

console.log('TEST');

// $FlowFixMe
const testsContext = require.context('../src', true, /.spec$/);

console.log('TEST');
console.log(testsContext);
console.log('\n\n\n TESTING');

testsContext.keys().forEach(testsContext);

/* eslint-disable mocha/no-top-level-hooks,mocha/no-hooks-for-single-case */
Expand Down
12 changes: 10 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const FlowWebpackPlugin = require('flow-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const WriteFilePlugin = require('write-file-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
Expand Down Expand Up @@ -61,6 +62,8 @@ module.exports = (env) => {
chunks: ['storage']
}),

new MiniCssExtractPlugin(),

// Run Flow on Webpack Compile
new FlowWebpackPlugin({
failOnError: false,
Expand Down Expand Up @@ -115,8 +118,11 @@ module.exports = (env) => {
{
test: /\.css$/,
use: [
// {
// loader: 'style-loader',
// },
{
loader: 'style-loader',
loader: MiniCssExtractPlugin.loader
},
{
loader: 'css-loader',
Expand All @@ -126,7 +132,7 @@ module.exports = (env) => {
},
{
loader: 'postcss-loader'
}
},
]
},

Expand Down Expand Up @@ -170,5 +176,7 @@ module.exports = (env) => {
});
}

console.log('TEST1');

return config;
};

0 comments on commit 97567e5

Please sign in to comment.