Skip to content

Commit

Permalink
Merge pull request #61 from joanrodas/dev
Browse files Browse the repository at this point in the history
Update webpack
  • Loading branch information
joanrodas authored Jan 5, 2023
2 parents 1ab4459 + 718db93 commit 742a36f
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 1,853 deletions.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@
},
"devDependencies": {
"@wordpress/scripts": "latest",
"css-loader": "6.7.1",
"mini-css-extract-plugin": "2.6.1",
"postcss": "8.4.18",
"postcss-loader": "7.0.1",
"postcss-preset-env": "7.8.2",
"sass": "1.55.0",
"css-loader": "6.7.3",
"mini-css-extract-plugin": "2.7.2",
"postcss": "8.4.20",
"postcss-loader": "7.0.2",
"postcss-preset-env": "7.8.3",
"sass": "1.57.1",
"sass-loader": "13.1.0",
"ts-loader": "latest",
"typescript": "latest",
"webpack": "4.44.2",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-fix-style-only-entries": "0.6.1"
}
}
8 changes: 8 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// const tailwindcss = require('tailwindcss');

module.exports = {
plugins: [
'postcss-preset-env',
// tailwindcss
],
};
14 changes: 14 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
content: ['./resources/**/*.{php,js}', './Functionality/**/*.php', './Components/**/*.php'],
theme: {
extend: {
colors: {},
},
},
plugins: [], //require("daisyui")
important: true,
prefix: 'pb-',
corePlugins: {
preflight: false,
}
};
12 changes: 7 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
const postcssPresetEnv = require('postcss-preset-env');

module.exports = {
...defaults,
entry: {
scripts: path.resolve(process.cwd(), 'resources/scripts', 'app.ts')
app: [path.resolve(process.cwd(), 'resources/scripts', 'app.ts'), path.resolve(process.cwd(), 'resources/styles', 'app.scss')]
},
output: {
filename: '[name].js',
path: path.resolve(process.cwd(), 'dist'),
},
module: {
...defaults.module,
rules: [
...defaults.module.rules,
{
test: /\.tsx?$/,
use: [
Expand Down Expand Up @@ -67,5 +64,10 @@ module.exports = {
},
resolve: {
extensions: ['.ts', '.tsx', ...(defaults.resolve ? defaults.resolve.extensions || ['.js', '.jsx'] : [])]
}
},
plugins: [
new MiniCSSExtractPlugin({
filename: '[name].css'
})
]
};
Loading

0 comments on commit 742a36f

Please sign in to comment.