added purgecss and cssnano
This commit is contained in:
parent
211404237a
commit
d881755814
@ -1,6 +1,6 @@
|
|||||||
@import 'tailwindcss/preflight';
|
@tailwind preflight;
|
||||||
@import 'tailwindcss/components';
|
@tailwind components;
|
||||||
@import 'tailwindcss/utilities';
|
@tailwind utilities;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
2832
package-lock.json
generated
2832
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -64,6 +64,7 @@
|
|||||||
"@babel/polyfill": "^7.0.0",
|
"@babel/polyfill": "^7.0.0",
|
||||||
"@babel/preset-env": "^7.1.0",
|
"@babel/preset-env": "^7.1.0",
|
||||||
"@dannycoates/webpack-dev-server": "^3.1.4",
|
"@dannycoates/webpack-dev-server": "^3.1.4",
|
||||||
|
"@fullhuman/postcss-purgecss": "^1.1.0",
|
||||||
"@mattiasbuelens/web-streams-polyfill": "0.1.0",
|
"@mattiasbuelens/web-streams-polyfill": "0.1.0",
|
||||||
"asmcrypto.js": "^2.3.2",
|
"asmcrypto.js": "^2.3.2",
|
||||||
"babel-loader": "^8.0.4",
|
"babel-loader": "^8.0.4",
|
||||||
@ -76,6 +77,7 @@
|
|||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.0",
|
||||||
"css-loader": "^1.0.0",
|
"css-loader": "^1.0.0",
|
||||||
"css-mqpacker": "^7.0.0",
|
"css-mqpacker": "^7.0.0",
|
||||||
|
"cssnano": "^4.1.7",
|
||||||
"eslint": "^5.6.1",
|
"eslint": "^5.6.1",
|
||||||
"eslint-plugin-mocha": "^5.2.0",
|
"eslint-plugin-mocha": "^5.2.0",
|
||||||
"eslint-plugin-node": "^7.0.1",
|
"eslint-plugin-node": "^7.0.1",
|
||||||
@ -97,8 +99,6 @@
|
|||||||
"nanotiming": "^7.3.1",
|
"nanotiming": "^7.3.1",
|
||||||
"npm-run-all": "^4.1.3",
|
"npm-run-all": "^4.1.3",
|
||||||
"nyc": "^13.0.1",
|
"nyc": "^13.0.1",
|
||||||
"postcss-cssnext": "^3.1.0",
|
|
||||||
"postcss-import": "^12.0.0",
|
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"prettier": "^1.14.3",
|
"prettier": "^1.14.3",
|
||||||
"proxyquire": "^2.1.0",
|
"proxyquire": "^2.1.0",
|
||||||
|
@ -1,10 +1,25 @@
|
|||||||
const options = {
|
class TailwindExtractor {
|
||||||
plugins: {
|
static extract(content) {
|
||||||
'postcss-import': {},
|
return content.match(/[A-Za-z0-9-_:/]+/g) || [];
|
||||||
tailwindcss: {},
|
|
||||||
'postcss-cssnext': {},
|
|
||||||
'css-mqpacker': {}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
plugins: [
|
||||||
|
require('tailwindcss')('./tailwind.js'),
|
||||||
|
require('@fullhuman/postcss-purgecss')({
|
||||||
|
content: ['./app/*.js', './app/ui/*.js'],
|
||||||
|
extractors: [
|
||||||
|
{
|
||||||
|
extractor: TailwindExtractor,
|
||||||
|
extensions: ['js']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
require('cssnano')({
|
||||||
|
preset: 'default'
|
||||||
|
})
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
Loading…
Reference in New Issue
Block a user