-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
684f571
commit d1675ef
Showing
18 changed files
with
4,357 additions
and
2,066 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
|
||
# Webpack asset destination | ||
/content/assets | ||
/content/_data/assets.json | ||
webpack.hash | ||
.webpack |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ const main = async () => { | |
}; | ||
|
||
main(); | ||
|
||
const yourl = new URL(window.location); | ||
console.log(yourl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
@import "tailwindcss/utilities"; | ||
|
||
body { | ||
background-color: cornflowerblue; | ||
background: green; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const path = require('path') | ||
|
||
module.exports = { | ||
cache: { | ||
type: 'filesystem', | ||
cacheDirectory: path.resolve(__dirname, '..', '.webpack') | ||
}, | ||
output: { | ||
filename: '[name].js', | ||
path: path.resolve(__dirname, '..', 'content', 'assets'), | ||
publicPath: "/", | ||
}, | ||
mode: process.env.NODE_ENV || 'development', | ||
devtool: 'source-map', | ||
stats: 'errors-only', | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
const base = require('./webpack.config.base') | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
...base, | ||
|
||
name: 'legacy', | ||
entry: { | ||
legacy: [ | ||
path.join(__dirname, '..', 'assets', 'scripts', 'main.js'), | ||
], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
babelrc: false, | ||
exclude: [ | ||
/core-js/, | ||
/regenerator-runtime/, | ||
], | ||
presets: [ | ||
['@babel/preset-env', { | ||
loose: true, | ||
modules: false, | ||
// debug: true, | ||
corejs: 3, | ||
useBuiltIns: 'usage', | ||
targets: { | ||
browsers: [ | ||
'> 1%', | ||
'last 2 versions', | ||
'Firefox ESR', | ||
], | ||
}, | ||
}], | ||
], | ||
sourceType: 'unambiguous', | ||
plugins: ['@babel/plugin-syntax-dynamic-import'], | ||
}, | ||
}, | ||
}, | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
const base = require('./webpack.config.base') | ||
const path = require('path'); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
|
||
module.exports = { | ||
...base, | ||
|
||
name: 'main', | ||
entry: { | ||
main: [ | ||
path.join(__dirname, '..', 'assets', 'scripts', 'main.js'), | ||
path.join(__dirname, '..', 'assets', 'styles', 'main.css'), | ||
], | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin({ | ||
filename: '[name].css', | ||
}), | ||
], | ||
devServer: { | ||
contentBase: path.join(__dirname, '..', 'dist'), | ||
compress: true, | ||
port: 9000, | ||
watchContentBase: true, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
babelrc: false, | ||
exclude: [ | ||
/core-js/, | ||
/regenerator-runtime/, | ||
], | ||
presets: [ | ||
['@babel/preset-env', { | ||
loose: true, | ||
modules: false, | ||
// debug: true, | ||
corejs: 3, | ||
useBuiltIns: 'usage', | ||
targets: { | ||
browsers: [ | ||
'last 2 Chrome versions', 'not Chrome < 60', | ||
'last 2 Safari versions', 'not Safari < 10.1', | ||
'last 2 iOS versions', 'not iOS < 10.3', | ||
'last 2 Firefox versions', 'not Firefox < 54', | ||
'last 2 Edge versions', 'not Edge < 15', | ||
], | ||
}, | ||
}], | ||
], | ||
sourceType: 'unambiguous', | ||
plugins: ['@babel/plugin-syntax-dynamic-import'], | ||
}, | ||
}, | ||
}, | ||
{ | ||
test: /\.css$/i, | ||
use: [ | ||
MiniCssExtractPlugin.loader, | ||
{ | ||
loader: 'css-loader', | ||
options: { | ||
importLoaders: 1 | ||
}, | ||
}, | ||
'postcss-loader', | ||
] | ||
}, | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
{% include "partials/nomodule-polyfill.njk" %} | ||
{% include "partials/nomodule-polyfill.njk" %} | ||
<script type="module" src="/main.js"></script> | ||
<script nomodule src="/legacy.js"></script> |
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
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
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
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
Oops, something went wrong.