Add webpack to be used when building vue and JS
This commit is contained in:
parent
8d704ae5c8
commit
3c47c1565f
5 changed files with 2396 additions and 1227 deletions
37
webpack.config.js
Normal file
37
webpack.config.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
module.exports = {
|
||||
entry: './resources/assets/pterodactyl/scripts/app.js',
|
||||
output: {
|
||||
filename: 'webpack.build.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: {
|
||||
postcss: [
|
||||
require('postcss-import'),
|
||||
require('postcss-preset-env')({stage: 0}),
|
||||
require('tailwindcss')('./tailwind.js'),
|
||||
require('autoprefixer'),
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules)/,
|
||||
use: [{
|
||||
loader: "babel-loader",
|
||||
options: { presets: ['es2015'] }
|
||||
}]
|
||||
},
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'vue': 'vue/dist/vue.js'
|
||||
},
|
||||
extensions: ['*', '.js', '.vue', '.json']
|
||||
},
|
||||
plugins: [],
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue