Add webpack to be used when building vue and JS

This commit is contained in:
Dane Everitt 2018-03-30 23:58:38 -05:00
parent 8d704ae5c8
commit 3c47c1565f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 2396 additions and 1227 deletions

37
webpack.config.js Normal file
View 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: [],
};