mirror of https://github.com/IoTcat/sakura2.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
931 B
43 lines
931 B
const path = require('path'); |
|
|
|
module.exports = [{ |
|
mode: "development", // "production" | "development" | "none" |
|
entry: { |
|
style_bundle: './src/scss/index.scss', |
|
script_bundle: './src/ts/index.ts' |
|
}, |
|
devtool: 'inline-source-map', |
|
output: { |
|
//path: path.resolve(__dirname, "dist"), |
|
//what's the difference? |
|
publicPath : 'dist', |
|
filename: '[name].js', |
|
}, |
|
module: { |
|
rules: [ |
|
{ |
|
test: /\.scss$/, |
|
use: [ |
|
{ |
|
loader: 'file-loader', |
|
options: { |
|
outputPath: 'dist', |
|
name: 'bundle.css', |
|
}, |
|
}, |
|
{ loader: 'extract-loader' }, |
|
{ loader: 'css-loader' }, |
|
{ loader: 'sass-loader' }, |
|
] |
|
}, |
|
{ |
|
test: /\.tsx?$/, |
|
use: 'ts-loader', |
|
exclude: /node_modules/ |
|
} |
|
] |
|
}, |
|
resolve: { |
|
extensions: [ '.tsx', '.ts', '.js' ] |
|
}, |
|
}]; |