Last active
December 13, 2018 17:19
-
-
Save tmcw/bd63b878169fd676e32c34096e58060f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as Library from "@observablehq/stdlib"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"@observablehq/stdlib": "^2.0.3", | |
"extract-text-webpack-plugin": "^3.0.2", | |
"html-webpack-plugin": "^3.2.0", | |
"webpack": "3.6.0", | |
"source-map-loader": "^0.2.4" | |
}, | |
"scripts": { | |
"test": "webpack --config=webpack.js" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const path = require("path"); | |
const webpack = require("webpack"); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
module.exports = { | |
entry: "./index.js", | |
output: { | |
filename: "bundle.js", | |
path: path.join(__dirname, "dist") | |
}, | |
module: { | |
rules: [ | |
{ | |
enforce: "pre", | |
test: /\.js$/, | |
use: ["source-map-loader"] | |
}, | |
{ | |
enforce: "pre", | |
test: /\.ts$/, | |
use: ["source-map-loader"] | |
}, | |
{ | |
test: /\.ts$/, | |
loader: "ts-loader" | |
}, | |
{ | |
test: /\.css$/, | |
use: ExtractTextPlugin.extract({ | |
use: "css-loader", | |
fallback: "style-loader" | |
}) | |
}, | |
{ | |
test: /\.(png|woff|woff2|eot|ttf|svg|jpg)$/, | |
loader: "url-loader?limit=100000" | |
} | |
] | |
}, | |
devtool: "source-map", | |
plugins: [ | |
new ExtractTextPlugin("styles.css"), | |
new HtmlWebpackPlugin({ | |
title: "Project" | |
}), | |
new webpack.ProvidePlugin({ | |
$: "jquery", | |
jQuery: "jquery" | |
}), | |
new webpack.NormalModuleReplacementPlugin(/AsyncLoad\.js/, function( | |
resource | |
) { | |
resource.request = resource.request.replace( | |
/AsyncLoad/, | |
"AsyncLoad-disabled" | |
); | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment