mirror of
https://github.com/tenrok/vue-ganttastic.git
synced 2026-06-23 23:30:32 +03:00
fix: webpack
This commit is contained in:
+1
-1
@@ -6,6 +6,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="vue-ganttastic-825301a1"></div>
|
<div id="vue-ganttastic-825301a1"></div>
|
||||||
<script src="/dist/build.js"></script>
|
<script src="/dist/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tenrok/vue-ganttastic",
|
"name": "@tenrok/vue-ganttastic",
|
||||||
"version": "0.10.7",
|
"version": "0.10.8",
|
||||||
"description": "A simple and customizable Gantt chart component for Vue.js",
|
"description": "A simple and customizable Gantt chart component for Vue.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"gantt",
|
"gantt",
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"dist/*"
|
"dist/*"
|
||||||
],
|
],
|
||||||
"main": "src/main.js",
|
"main": "./dist/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/tenrok/vue-ganttastic.git"
|
"url": "git+https://github.com/tenrok/vue-ganttastic.git"
|
||||||
|
|||||||
+23
-26
@@ -6,54 +6,51 @@ module.exports = {
|
|||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, './dist'),
|
path: path.resolve(__dirname, './dist'),
|
||||||
publicPath: '/dist/',
|
publicPath: '/dist/',
|
||||||
filename: 'build.js'
|
filename: 'index.js',
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: [
|
use: ['vue-style-loader', 'css-loader'],
|
||||||
'vue-style-loader',
|
},
|
||||||
'css-loader'
|
{
|
||||||
],
|
|
||||||
}, {
|
|
||||||
test: /\.vue$/,
|
test: /\.vue$/,
|
||||||
loader: 'vue-loader',
|
loader: 'vue-loader',
|
||||||
options: {
|
options: {
|
||||||
loaders: {
|
loaders: {},
|
||||||
}
|
|
||||||
// other vue-loader options go here
|
// other vue-loader options go here
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
exclude: /node_modules/
|
exclude: /node_modules/,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(png|jpg|gif|svg)$/,
|
test: /\.(png|jpg|gif|svg)$/,
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[name].[ext]?[hash]'
|
name: '[name].[ext]?[hash]',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'vue$': 'vue/dist/vue.esm.js'
|
vue$: 'vue/dist/vue.esm.js',
|
||||||
},
|
},
|
||||||
extensions: ['*', '.js', '.vue', '.json']
|
extensions: ['*', '.js', '.vue', '.json'],
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
historyApiFallback: true,
|
historyApiFallback: true,
|
||||||
noInfo: true,
|
noInfo: true,
|
||||||
overlay: true
|
overlay: true,
|
||||||
},
|
},
|
||||||
performance: {
|
performance: {
|
||||||
hints: false
|
hints: false,
|
||||||
},
|
},
|
||||||
devtool: '#eval-source-map'
|
devtool: '#eval-source-map',
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
@@ -62,17 +59,17 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
module.exports.plugins = (module.exports.plugins || []).concat([
|
module.exports.plugins = (module.exports.plugins || []).concat([
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
NODE_ENV: '"production"'
|
NODE_ENV: '"production"',
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
sourceMap: true,
|
sourceMap: false,
|
||||||
compress: {
|
compress: {
|
||||||
warnings: false
|
warnings: false,
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
new webpack.LoaderOptionsPlugin({
|
new webpack.LoaderOptionsPlugin({
|
||||||
minimize: true
|
minimize: true,
|
||||||
})
|
}),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user