Skip to content

Instantly share code, notes, and snippets.

@MikeCheng1208
MikeCheng1208 / webpack.config.js
Last active April 27, 2018 05:45
webpack.config.js 基礎設定
const path = require('path');
module.exports = {
entry: './index.js',
output: {
filename: 'index.bundle.js',
path: path.resolve(__dirname, './'),
}
};
@MikeCheng1208
MikeCheng1208 / webpack.config.js
Last active August 15, 2018 04:22
Article teaching
var path = require('path');
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: './index.js',
output: {
filename: 'index-bundle.js',
}
}
@MikeCheng1208
MikeCheng1208 / webpack.config.js
Last active August 15, 2018 06:11
output path setting
var path = require('path');
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: './index.js',
output: {
path: path.resolve(__dirname, 'App'),
filename: 'index-bundle.js',
}
}
@MikeCheng1208
MikeCheng1208 / webpack.config.js
Created September 11, 2018 06:56
webpack setting
var path = require('path');
module.exports = {
context: path.resolve(__dirname, 'js'),
entry: {
index: './index.js'
},
output: {
path: path.resolve(__dirname, 'js'),
filename: './index.bundle.js',
}
@MikeCheng1208
MikeCheng1208 / webpack.config.js
Created September 11, 2018 07:04
webpack babel setting
var path = require('path');
module.exports = {
context: path.resolve(__dirname, 'js'),
entry: {
index: './index.js'
},
output: {
path: path.resolve(__dirname, 'js'),
filename: './index.bundle.js',
},
@MikeCheng1208
MikeCheng1208 / package.json
Last active October 18, 2018 12:44
package.json
{
"name": "webpack-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
},
"author": "",
@MikeCheng1208
MikeCheng1208 / package.json
Last active October 18, 2018 12:45
watch setting no model
{
"name": "watch",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"watch": "webpack --watch",
"build": "webpack"
},
"author": "",
@MikeCheng1208
MikeCheng1208 / package.json
Last active October 18, 2018 12:45
watch setting --mode
{
"name": "watch",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"watch": "webpack --watch --mode development",
"build": "webpack --mode production"
},
"author": "",
@MikeCheng1208
MikeCheng1208 / package.json
Last active October 21, 2018 00:46
webpack babel
{
"name": "Babel",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"watch": "webpack --mode development --watch",
"start": "webpack --mode development",
"deploy": "webpack --mode production"
},
{
test: /\.(sass|scss)$/,
use: [
'vue-style-loader',
'css-loader',
'postcss-loader',
{
loader: 'sass-loader',
options:{
data: `@import "./src/scss/global/_mixin.scss";`